Slide 1

Slide 1 text

GA4 Debugging: Survive and Thrive Jonathan Moore Speakerdeck.com/nathanless Linkedin.com/in/moorejonathan @nathanless

Slide 2

Slide 2 text

What I do I solve problems and build capabilities About me Technical SEO and Analytics Consultant

Slide 3

Slide 3 text

Why we are here today

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

How to spot common tagging issues

Slide 8

Slide 8 text

WHAT tag IDs and parameters are firing

Slide 9

Slide 9 text

HOW tags are firing

Slide 10

Slide 10 text

WHERE(abouts) tags are located

Slide 11

Slide 11 text

WHEN tags are firing

Slide 12

Slide 12 text

WHY tags are firing

Slide 13

Slide 13 text

Google Tag Checks

Slide 14

Slide 14 text

What is a Google Tag?

Slide 15

Slide 15 text

Google Tag Destination 1 Destination2

Slide 16

Slide 16 text

Google Tag Destination 1 Destination2 Single Tag

Slide 17

Slide 17 text

Google Tag Destination 1 Destination2 Multiple Destinations

Slide 18

Slide 18 text

GT-XXXXXXXXX

Slide 19

Slide 19 text

G-XXXXXXXXX

Slide 20

Slide 20 text

AW-XXXXXXXXX

Slide 21

Slide 21 text

Google Tag Checks

Slide 22

Slide 22 text

Data Streams > Web Stream Details > Configure Tag Settings

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

A brief note on Tag Diagnostics

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Pay attention to Google Tag IDs

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Check tag details for ignore duplicates

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

Review Google Tag settings

Slide 33

Slide 33 text

Potential to conflict with stream settings

Slide 34

Slide 34 text

Check for random domains

Slide 35

Slide 35 text

Strong indicator of legacy tag or bungled migratin

Slide 36

Slide 36 text

Make sure third-party payment gateways are added

Slide 37

Slide 37 text

Snippet Checks

Slide 38

Slide 38 text

What should the Google Tag snippet lookalike?

Slide 39

Slide 39 text

window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-PSW1MY7HB4');

Slide 40

Slide 40 text

gtag() SNIPPET SHOULD BE HERE.

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-PSW1MY7HB4');

Slide 43

Slide 43 text

Do the same for GTM

Slide 44

Slide 44 text

GTM SNIPPET SHOULD BE HERE. GTM SNIPPET SHOULD BE HERE.

Slide 45

Slide 45 text

window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-PSW1MY7HB4');

Slide 46

Slide 46 text

Use Screaming Frog to check tag is on every page

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

https://jonathanmoore.digital/bseo-oct-24

Slide 49

Slide 49 text

Use Little Warden to detect snippet changes

Slide 50

Slide 50 text

https://littlewarden.com/

Slide 51

Slide 51 text

Chrome Debugging Set up

Slide 52

Slide 52 text

Set up your own Chrome property for auditing

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

Add the Tag Assistant Companion Chrome extension

Slide 55

Slide 55 text

https://littlewarden.com/

Slide 56

Slide 56 text

Debugging 101 Using Tag Assistant

Slide 57

Slide 57 text

Navigate to the Tag Assistant site, input a domain and connect

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

The site you are debugging will appear in a new tab

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

The Summary will show you WHERE tags are firing.

Slide 62

Slide 62 text

WHERE

Slide 63

Slide 63 text

WHERE

Slide 64

Slide 64 text

Use the header to toggle between tags

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

You should see a Page View hit

Slide 69

Slide 69 text

WHAT

Slide 70

Slide 70 text

The User Engagement hit is a can of worms

Slide 71

Slide 71 text

https://www.analyticsmania.com/post/user_engagement-event-in-google-analytics-4/

Slide 72

Slide 72 text

Use the timeline to inspect WHEN tags fired

Slide 73

Slide 73 text

WHEN

Slide 74

Slide 74 text

Click individual tags to inspect the WHAT

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

WHAT

Slide 77

Slide 77 text

Important debugging parameters

Slide 78

Slide 78 text

Measurement ID

Slide 79

Slide 79 text

Event Name

Slide 80

Slide 80 text

Client ID

Slide 81

Slide 81 text

Session ID

Slide 82

Slide 82 text

Click the trash icon to clear all messages

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

Navigate and interact with the page and reload as necessary

Slide 85

Slide 85 text

Debugging 201 GTM Preview Mode

Slide 86

Slide 86 text

Inside GTM you can also use preview mode to debug tags

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

This helps you debug GTM triggers and variables

Slide 89

Slide 89 text

No content

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

Triggers are the WHY

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

The Google Tag should use the Initialisation Trigger https://support.google.com/tagmanager/answer/9442095?hl=en

Slide 95

Slide 95 text

Variables are the WHAT

Slide 96

Slide 96 text

No content

Slide 97

Slide 97 text

The debug_mode parameter checks the WHAT and WHEN

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

Data Display > Debug View

Slide 100

Slide 100 text

No content

Slide 101

Slide 101 text

Debugging 301 Using Chrome Dev Tools

Slide 102

Slide 102 text

Navigate to the Network tab

Slide 103

Slide 103 text

No content

Slide 104

Slide 104 text

Click the cog icon and select “Big request rows” and “Screenshots”

Slide 105

Slide 105 text

No content

Slide 106

Slide 106 text

Right-click the name panel and add “Domain” and “Initiator” as columns.

Slide 107

Slide 107 text

No content

Slide 108

Slide 108 text

Click “Disable cache” to emulate first time visits

Slide 109

Slide 109 text

No content

Slide 110

Slide 110 text

Use the “Preserve log” checkbox to persist requests between pages

Slide 111

Slide 111 text

No content

Slide 112

Slide 112 text

Use the “Stop” and “Clear” icons as necessary

Slide 113

Slide 113 text

No content

Slide 114

Slide 114 text

Click the “Funnel” icon to toggle filters

Slide 115

Slide 115 text

No content

Slide 116

Slide 116 text

Type collect?v= into the filter box to highlight GA requests

Slide 117

Slide 117 text

No content

Slide 118

Slide 118 text

No content

Slide 119

Slide 119 text

Add event_name to check for duplicate events

Slide 120

Slide 120 text

No content

Slide 121

Slide 121 text

Type gtag/js into the filter box to highlight gtag requests

Slide 122

Slide 122 text

No content

Slide 123

Slide 123 text

Type gtm.js? into the filter box to highlight GTM requests

Slide 124

Slide 124 text

No content

Slide 125

Slide 125 text

Navigate to the Payload tab to see its parameters

Slide 126

Slide 126 text

No content

Slide 127

Slide 127 text

No content

Slide 128

Slide 128 text

Measurement Protocol Cheat Sheet https://www.thyngster.com/ga4-measurement- protocol-cheatsheet/

Slide 129

Slide 129 text

Navigate to the Initiator tab to see the request initiator chain

Slide 130

Slide 130 text

No content

Slide 131

Slide 131 text

Type domain:*google* to filter “Google” requests using a wildcard

Slide 132

Slide 132 text

Hover over request and hold shift to highlight dependencies

Slide 133

Slide 133 text

Right-click a request to block it

Slide 134

Slide 134 text

This is an easy way to check if GTM or a CMP are causing problems

Slide 135

Slide 135 text

Finally, use Ctrl + Shift + F to search all loaded sources

Slide 136

Slide 136 text

Best way to find random apps that are sending events

Slide 137

Slide 137 text

What we have learned

Slide 138

Slide 138 text

• Find tags • Check tag syntax • Review tag settings • Find legacy tags • Perform bulk tag checks • Locate events that are firing twice • Check for broken journeys • Set up debug_mode • Block GTM

Slide 139

Slide 139 text

Thank You…

Slide 140

Slide 140 text

Any Questions? https://www.linkedin.com/in/moorejonathan/ https://x.com/nathanless