FDB Google Tag Manager - Setup [mod]
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

View only
 
 
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
This document documents the definition of the Google Tag Manager containers for the website Prod and the website Test.
2
Creation Date: Dec2014.
3
Last Update: Dec2014.
4
5
Notes:
6
Make sure to disable the UA Tag's debug-mode before publishing the FINAL version to Production.
7
All objects are created under one GTM account unless specified otherwise.
8
Wordpress: place the GTM bootstrap script immediately after the opening <body> tag. This can be done in WP Admin -> Theme -> Custom :)
9
The Global Function Name of a Universal Analytics tag is ga; meaning that all GA function calls that are executed by GTM go through that function call (with a custom tracker name...).
10
Google Analytics
11
PropertyTracking IDNotes
12
www.prod.beUA-99999999-1Production
13
www.test.beUA-99999999-2Development
14
Main reasons for GTM
15
Learn a Tag solution.
16
Remove dependency on the plugin Google Analytics for Wordpress.
17
Flexible deployment of pixels.
18
19
My GTM Custom Event implementation - My pipeline to add Google Analytics Events with ease :
20
Client Javascript Code:
21
// nonInteraction: If true Then this event hit will not be used in bounce rate calculations.
22
dataLayer.push({
23
"event": "mjd-custom-event",
24
"mjdce" : {
25
"category": string,
26
"action": string,
27
"label": string,
28
"value": number,
29
"nonInteraction": boolean
30
}
31
}
32
Triggers and Tags.
33
Wordpress CMS Changes
34
# Deactivate the plugin Google Analytics for Wordpress. And delete it a few weeks later when you are sure that GTM works properly.
35
# Modify & redeploy my plugins. Do implemement the GTM Data Layer to send data to Google Analytics (opposed to calling ga() directly which does not work anymore either because it is wrapped in GTM).
36
# Update WP Admin -> Theme -> Custom -> Asynchronous Analytics Script : paste the GTM bootstrap script. [FYI The theme injects it right after the <body> tag :) ]
37
REFSCRIPT < Async Analytics Script.txt >
38
# Update the WP Admin -> Theme -> Custom -> FooterScript : remove the Perfect Audience and Facebook Pixel script (they are managed now by GTM).
39
REFSCRIPT < Footer Scripts.txt >
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...