Google Analytics

Anonymous
Not applicable

Google Analytics

I want to track visits to marketo landing pages along with my site's google analytics. This is a comment that appears on free-form template :

<!--GOOGLE ANALYTICS.  ENTER YOUR CODE and UNCOMMENT block -->

<!--

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">

</script>

<script type="text/javascript">

_uacct = "YOURCODE";

urchinTracker();

</script>

-->

I've added my tracking code and uncommented the code but tracking doens't seem to be working. Anything else I'm missing?

(I see no active users on GA once I've approved the template even though I've loaded the page)

Tags (1)
2 REPLIES 2
Anonymous
Not applicable

Re: Google Analytics

or would it be sufficient to replace this with the tracking code that can be copied from the google analytics site itself?

Grégoire_Miche2
Level 10

Re: Google Analytics

Hi Natalia,

This is the old Urchin code. Do not use it an use a Universal Analytics that you can get from your GA account instead. Go to GA, then admin -> Property -> Tracking code.

The code has this form:

<!-- Global site tag (gtag.js) - Google Analytics -->

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-99999999-9"></script>

<script>

  window.dataLayer = window.dataLayer || [];

  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());

  gtag('config', 'UA-99999999-9');

</script>

-Greg