Skip to main content
April 30, 2018
Question

Google Analytics

  • April 30, 2018
  • 1 reply
  • 2555 views

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="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)

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

April 30, 2018

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
April 30, 2018

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