Forums/General Categories/Implementation

Implementing SiteApps tag on your site for the 1st time?

Phillip Klien
posted this on March 16, 2011 21:33

You can retrieve your site's tag from the "tags" section of the SiteApps user interface.  The javascript tag should look like this:

 

<script type="text/javascript">
//<![CDATA[[
$SA={s:YOUR_SITE_ID,asynch:1};
(function(){
var sa = document.createElement("script"); sa.type = "text/javascript"; sa.async = true;
sa.src = ("https:" == document.location.protocol ? "https://" + $SA.s + ".sa" : "http://" + $SA.s + ".a") + ".siteapps.com/" + $SA.s + ".js";
var t = document.getElementsByTagName("script")[0]; t.parentNode.insertBefore(sa, t);
})();
//]]>
</script>

 

 

 

OrangeBullet.png  Tag implementation

Because many of the apps available on SiteApps could offer a better user experience if the tag is loaded in the beginning of the page, we recommend to implement it in the <HEAD> section of your HTML code, right before closing the </HEAD> tag.  Some apps may use information from the webpage (such as the Head Title or Meta Description), so make sure the SiteApps tag is placed after these.

 

But the tag can be implemented anywhere on the site, and some may prefer to install it at the end of the HTML code, right before the </BODY> tag.

 

OrangeBullet.png  Tag Customizations

SiteApps can be used as a tag management system.  If you will be using testing platforms or other applications that will dynamically update your web site - we strongly recommend that you use the synchronous version of the tag.  

 

Important note: Changing from asynchronous to synchronous tags requires a site code change.  If in doubt, do install the synchronous version (that supports testing platforms).

 

OrangeBullet.png  Performance

We constantly work to optimize the response time for the SiteApps tag.

 

We also believe in transparency.  Check out our real-time third-party performance audit of SiteApps system status.

 

OrangeBullet.png  Privacy

We treat privacy very seriously.  SiteApps only uses first-party cookies.  When a website signs up with SiteApps, they agree through the terms of service to notify their users that that site is using SiteApps and post a link to our Opt-out URL on their own privacy policy (and/or their own terms of service) to allow users to opt-out of SiteApps on that site.  Please use this link:

 

 

<script src="http://siteapps.com/js/sa_optout.js" type="text/javascript"></script>
Your current cookie status for SiteApps on this site is:
<span id="sa_optstatus"></div>
<script type="text/javascript">saOptout("status");</script>
http://siteapps.com/web/optout
 

Comments

User photo
amelia lopez solersi

I have my site with wordpress so all the template are in php where should i put the code?

July 22, 2011 10:50
User photo
Phillip Klien
SiteApps.com

Hello Amelia - we just launched our WordPress plugin that automatically includes the SiteApps tag.  Download the plugin here:

 

http://wordpress.org/extend/plugins/siteapps/

 

Thank you,

SiteApps Team

July 22, 2011 10:58
User photo
Chris Kennedy
Hi, I use Modx as a cms.. modx interprests double square brackets, as a tag to insert a variable. As a result most of the code is lost. Is there an alternative tracking script or any way it can be adjusted to compensate. Sorry I know llittle about JavaScript
December 01, 2011 06:10
User photo
Phillip Klien
SiteApps.com

Hi Chris - the square brackets are used to guarantee W3C HTML5 strict compliance.  However, the tag will function correctly without these lines.

 

Because of how Modx works, you can use the SiteApps tags without the lines that have double brackets:

//<![CDATA[[ 

and

//]]> 

 

Cheers,

SiteApps Team

December 01, 2011 12:33
User photo
Richard Ng

I've tried to incorporate the app (Floating Social Widget) into my blog (using Blogger) but don't quite get it what specific script/HTML codes I need to install in my blog? Can anyone help?

Thanks in advance.

 

December 11, 2011 21:38
User photo
shahmeerhaq

guys how can i add santa hat app to my blogger site.

December 13, 2011 07:39
User photo
Phillip Klien
SiteApps.com

Hi shahmeerhaq, to add the any app to your Blogger site you first have to create an account with SiteApps.  Then you can follow the steps in this article to install the SiteApps tag:

 

http://support.siteapps.com/entries/20780478-adding-siteapps-to-blogger-blogspot-site

 

Cheers,

SiteApps Team

December 13, 2011 13:21
User photo
Gustavo

After i enter the code, nothing shows up. And when i'm going to instal an app, appears this message : Warning: We noticed that the http://www.highgamesbr.blogspot.com does not have any server calls to SiteApps.  Apps will only work when the SiteApps tag has been installed correctly.  Learn more here. I'm doing  by the André Santos method.  Am I doing something wrong? Thank you.

December 30, 2011 14:15
User photo
Andre Santos

Hello Gustavo. 

I don't know what can possibly be wrong. In my case, everything worked flawlessly. All I did was add the HTML/Javascript gadget on Blogger and copy/past the code from SiteApps in it (<script> and </script> included as show in the image attached). Saved and it was running. You may want to check if, after saving the gadget it shows up in the layout screen to grantee it is deployed. It should work. 

Also, if you have more than one site in your profile at SiteApps, be sure to have the right site selected when you copy/past the code. 

 

January 09, 2012 04:57
User photo
Jessica de Farias

Plase

I doubt a lap on the site where the cod html applications
Jessica Farias
January 17, 2012 17:47
User photo
eke
Well I'm not sure wat to do even after all this comments. The tin is I am using a phone and to be precise a blackberry. Is there any chance it can still be done or is my only option using a pc??? Plzzz this is my site http://www.profalink.yooco.org if any one can help just sign up and I will give admin rights temporarily plz any one
October 06, 2012 06:56
User photo
Dana

I keep getting an error message for the code:

Error: missing : in conditional expression
Source File: http://.com/
Line: 42, Column: 76
Source Code:
sa.src = ("https:" == document.location.protocol ? "https:/ + $SA.s + ".sa" : "http:/ + $SA.s + ".a") + ".siteapps.com + $SA.s + ".js";

 

and I have no idea how to fix this... please advise.  

Thanks

October 25, 2012 06:26
User photo
Jonathan Thompson

Hello - I asked our web developer to add the code. How can I verify that is working? Thank you, JT.

February 04, 2013 23:11
User photo
Gabriel Pugliese
SiteApps.com

Hi Jonathan,

You can simply look at the Dashboard screen and check if there is more than 0 monthly server calls.

Best Regards,

Gabriel

February 05, 2013 17:56
User photo
Andrew Weiss

How to place this code in a php page (the page is a forum like http://www.simplemachines.org/) will it be an echo command? Also where would be the best location to add this code to our site (inside the php file)?

 

Thank you

February 06, 2013 08:42
User photo
Gabriel Pugliese
SiteApps.com

Hi Andrew,

You can implement our tag code the same way you implement in a simple HTML static page.

Find the file that contains the closing head tag (</head>). Looking to the source code of your website, it's between lines 30-33 (view-source:http://www.simplemachines.org/). Now, paste the SiteApps code right before that </head> tag and save the file.

Tell me if it works.

Gabriel

February 06, 2013 08:53
User photo
Morgan

I added the siteapps code to the same php file as my GA code about an hour ago, but it has not been found yet. The code comes up in the page source though, so is it typical for the code not to be found for several hours?

August 14, 2013 07:45
User photo
Gabriel Pugliese
SiteApps.com

Hi Morgan,

It usually takes only 10min to change the status of the tag on Dashboard screen. Can you please send us a ticket here: http://support.siteapps.com/requests/new with either your site id or site url ?

Thanks

August 14, 2013 08:45
User photo
Gabriel Pugliese
SiteApps.com

Hi again Morgan,

We've detected a simple problem with that functionality of the Dashboard and our engineers are already working to correct that.

Thanks for your report!

August 14, 2013 08:59
User photo
vermont

Where would I add the Javascript on a zen cart site?

October 24, 2013 13:03
User photo
Gabriel Pugliese
SiteApps.com

Hey Vermont,

I haven't used Zen Cart, but searching on internet I found this:

  1. Open /includes/templates/YOUR_TEMPLATE_NAME/common/html_header.php
  2. Insert the SiteApps tag just before </head>
  3. Upload the new html_header.php file to your server

Can you please test it ? Don't forget to get the real tag in your SiteApps dashboard on this link: https://siteapps.com/Tag/new_tag

October 24, 2013 13:10
User photo
vermont

I don't have an html_header.php file there.  I have a tpl_header.php though.   Same thing?  

October 24, 2013 13:26
User photo
Gabriel Pugliese
SiteApps.com
October 24, 2013 14:02
User photo
smnshafi

hi , I have a video sharing website www.videoscase.com

which is a clipbucket site where should I put that code please

November 17, 2013 09:07
User photo
Phillip Klien
SiteApps.com

Hey smnshafi,

Try these steps (sorry for the last message, forgot to add something):

  1. Open /styles/global/head.html
  2. Paste the SiteApps code on the bottom of the file between {literal} SITEAPPS CODE HERE {/literal} (Take a look on the file and you will understand, there are plenty of scripts in there)
  3. Save it and upload to your server

Tell me if this works for you, please ?

November 18, 2013 06:52
User photo
Vedarib Soluções Industriais

Meu site fica no criador de site da locaweb, fui na pagina onde será feito, inseria a tag e e nada ainda.

November 25, 2013 09:41
User photo
appsms1

Hello, I installed siteapps tag on my site http://direktorihosting.com but your site says that tag is not installed. I try use your plugin but the result is same. "Not Installed." Please Help me!

November 27, 2013 05:41
User photo
arjaytalosig

I already installed the wordpress plugin, entered my SiteApps ID, SiteApps Account Email and User API Key but it still says:

Site ID: *****

Tag Status :

NOT INSTALLED

 

what to do?

December 08, 2013 00:13
User photo
nestro

Well here to got some problems ... working with phpfox (so php) installed it in the head tag in my template.html.php file but it doesnot confirm its installed

December 08, 2013 02:39
User photo
nestro

ow and my site is bootstrapped

December 08, 2013 02:43
User photo
Phillip Klien
SiteApps.com

Hi nestro - the "tag status" message may take some minutes to be updated.

December 19, 2013 11:48