DTM Google Analytics Classic

When you set up a Google Analytics Classic tool, you can choose between using GA Default Name, DTM Generated Name, or Specific Name.

GA Default Name

When using the GA default name, then you can use Google Analytics as follows in script.

Without trackerName as variable

_gaq._getAsyncTracker()._trackPageview();

With trackerName:

tracker = _gaq._getAsyncTracker();
tracker._trackPageview()

DTM Generated Name

When using the GA DTM generated name, you can use Google analytics as follows in script.

Get the tracker name in DTM Google analytics classic interface:

image2016-2-23 11-25-3

Without trackerName variable:

_gaq._getAsyncTracker("ddf16922edc9c2318ea19ad8369fcc92")._trackPageview();

With trackerName:

tracker = _gaq._getAsyncTracker("ddf16922edc9c2318ea19ad8369fcc92");
tracker._trackPageview()

Specific Name

When using the specific name option, you can use Google Analytics classic as follows in script:

image2016-2-23 13-36-15

Without trackerName variable:

_gaq._getAsyncTracker("alexisclassic")._trackPageview();

With tracketName:

tracker = _gaq._getAsyncTracker("alexisclassic");
tracker._trackPageview()

DTM Google Analytics Universal

When you create a Google Analytics Universal tool, you can choose between using GA Default Name, DTM Generated Name, or Specific Name.

GA Default Name

When using the GA default name, you can use Google Analytics Universal as follows in script.

ga('send', 'pageview'); 

DTM Generated Name

When using the GA DTM generated name, you can use Google Analytics Universal as follows in script.

In this example, the tracker name is pulled from the DTM Google Analytics Universal interface:

image2016-2-23 12-12-21

For example:

ga('38f91ccf1ca252deaaba3c2fc421f0f3.send', 'pageview');

Specific Name

When using Specific Name, you can use Google Analytics Universal as follows in script

image2016-2-23 13-39-26
ga('alexisuniversal.send', 'pageview');

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy