Our documentation has moved!

You are currently viewing a legacy version of our help articles.
For the most up-to-date version, please use the new Chargify Help & Support Site.
Follow

Using Google Analytics with Hosted Signup Pages

Some of our users figured out how to use our Hosted Product Signup pages with Google Analytics.

Joe (joe@librato.com) said:

I've attempted to integrate our hosted payment page with our Google Analytics account by specifying the following (actual token obscured) in the "Custom Javascript Field" of our "Hosted Page Settings":

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try{
var pageTracker = gat.getTracker("UA-xxxxxxxx-1"); pageTracker._trackPageview(); } catch(err) {}

Unfortunately we're not registering any hits on the hosted payment page, even though I know we've hit it ourselves, for testing purposes. Is the above configuration correct?

Alan (alan@angrymonkeys.com.au) helped out with this:

For the old analytics code (which you're using) you need to include the following lines to your code:
pageTracker.setDomainName("none");
pageTracker.setAllowLinker(true);

If you're using the newer script it'd be this:
gaq.push(['setAllowLinker', true]); gaq.push(['setDomainName', 'none']);

The pages will look they're from YOUR domain unless you set up filters to show it as a different site. I guess that is personal prefernce.

If you're setting up funnels, you'll need to do some linking between your sites...see here -->
http://www.google.com/support/analytics/bin/answer.py?hl=en&ans...

I haven't completely set mine up yet, but I have successfully gotten a couple of pageviews with the above method.

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Pear Analytics

    Anyone tried using Clicky?  I've included the async version of the code, which apparently is supposed to automatically toggle between http and https pages, but I am also not getting any visits to register.  

  • 0
    Avatar
    Jack Haldrup

    If anyone is still looking for this.  If using the new asynchronous GA code, you will need to remove the first java script tage "<script type="text/javascript">" when you enter into the hosted page settings.  It seems the page was already including this.  

    Once i removed it and just pasted the remaining code, the GA data started showing correctly.

     

     

Please sign in to leave a comment.
Powered by Zendesk