how to install statcounter

  • 0
  • 1
  • Problem
  • Updated 2 years ago
  • In Progress
Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members. The community moderator provided the following reason for archiving: Archived

I'm trying to add 3rd party analytics (statcounter) to my website but for some reason it just doesn't work, It was very easy to do in the old sitebuilder, all I did was add the code into an HTML element

but with the new homesteadcloud when I embed the code in an HTML element it doesn't track

Here is the code, can someone please tell be what to do to make it work (I removed my ID and replaced it with XXXXX for privacy reasons)

<script type="text/javascript">
var sc_project=XXXXXXXX; 
var sc_invisible=1; 
var sc_security="XXXXXXXX"; 
var scJsHost = (("https:" == document.location.protocol) ?
"https://secure."; : "http://www.");
document.write("<sc"+"ript type='text/javascript' src='" +
scJsHost+
"statcounter.com/counter/counter.js'></"+"script>");
</script>
Photo of Pat6389

Pat6389

  • 1,034 Points 1k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Drew N

Drew N, Community Manager

  • 260,764 Points 100k badge 2x thumb
Unfortunately, at this time it will not work for this purpose. The HTML element in Websitebuilder runs within an iFrame, which means it is essentially it's own page framed within another page, and can't see the traffic to the mail page. I am sorry. We have requested this be changed, but we do not know if it can be change at this time.
Photo of Drew N

Drew N, Community Manager

  • 260,764 Points 100k badge 2x thumb
You can probably add it to the header or footer, as they are not framed, but you would have little control over where is is placed.
Photo of Pat6389

Pat6389

  • 1,034 Points 1k badge 2x thumb
thanks for the reply

can you explain how to add the code to the footer... I'd like to give that a try

Thanks again
Photo of Drew N

Drew N, Community Manager

  • 260,764 Points 100k badge 2x thumb
On the left, click manage. Then Advanced. Look for the box labeled "site footer"
Photo of Pat6389

Pat6389

  • 1,034 Points 1k badge 2x thumb
thanks for trying, unfortunately neither of those options worked 

the install instruction specify this.... "It's very important to install StatCounter in the correct place on your website i.e. just inside the closing "body" tag - </body>"

so is there any other option you are  of that might work?

Thanks
(Edited)
Photo of Drew N

Drew N, Community Manager

  • 260,764 Points 100k badge 2x thumb
Unfortunately not. There is a built in stats on the site, and you can add Google Analytics if desired, but at this time, we can't make this one work.
Photo of Pat6389

Pat6389

  • 1,034 Points 1k badge 2x thumb
thanks again, I don't use Google analytycs as I have dozens of websites and unfortunately homesteads analytics are lacking in stats (quite primitive to be honest)... It's shocking to me that 3rd party tracking can't be implemented in this platform...maybe one day homestead will catch up to the crowd!

cheers
Photo of Drew N

Drew N, Community Manager

  • 260,764 Points 100k badge 2x thumb
I am not sure why they implemented the HTML box in this manner. It was not like this in the Sitebuilder programs. We have made an enhancement request to see if this can be changed, but I am not sure what is happening with it.
Photo of Pat6389

Pat6389

  • 1,034 Points 1k badge 2x thumb
thanks again, if it ever gets implemented is there a way I can be notified?
(Edited)
Photo of Drew N

Drew N, Community Manager

  • 260,764 Points 100k badge 2x thumb
The new builder has a What's new pop up when things are released. That will be the quickest way to see.
Photo of Pat6389

Pat6389

  • 1,034 Points 1k badge 2x thumb
thanks, hope to see that implemented in near future

cheers

This conversation is no longer open for comments or replies.