Take your tracking to the next level with the power of Google Tag Manager #AFBMC
1. Take your tracking to the
next level with the power of
Google Tag Manager
Rahul Agarwal
Munich, 02nd Sept. 2020
2. › Head of Online Marketing at
Trenkwalder Group
› Digital Strategy & Web Analytics
Consultant at Nunatak Group
› SEO/ Business Development for
CupoNation (part of Rocket
Internet)
Over 7 years of experience in Paid
Social, Web Analytics and Performance
Marketing
Who am I?
3. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Trenkwalder Group at Glance
applications
candidates
employees
local offices
years of experience
countries
partner
1.000.000
300.000
40.000
200
35
17
1
We are a leading HR service provider in Central & Eastern Europe with €800 Mio. turnover
4. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Learnings for today…
• GDPR/ Cookie Compliance
• Understanding Facebook Pixel
• Tag Manager tips & tricks to power
the Pixel
5. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
GDPR vs. Cookies
6. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Current State of Cookie
implementations in EU
7. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
GDPR implementation is still in grey zone
TechCrunch
~5,000 Cookie notices
8. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
GDPR is clear in stating that if an Internet
service is relying on consent as a legal basis to
process visitors’ personal data it must obtain
consent before processing data (so before a
tracking cookie is dropped) — and that consent
must be specific, informed and freely given.
9. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
“Our results show that a reasonable amount
of users are willing to engage with consent
notices, especially those who want to opt out
or do not want to opt in. Unfortunately,
current implementations do not respect this
and the large majority offers no meaningful
choice.”
10. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Current Cookie
Consent
Implementations
11. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
TechCrunch – Cookie Wall
12. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
TNW – Cookie Wall
13. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
AllFacebook
14. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
121Watt
Text page
Facebook pixel
is not running
15. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Bounteous
16. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Understanding Facebook Pixel
Code implementation
via. Tag Manager
19. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Using Tag Manager to
power the Pixel
20. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Tip 1:
GDPR complaint FB Pixel
Tracking (via. website
cookie consent forms)
21. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Facebook allows to “revoke” and “grand” pixel access
GDPR Complaint Facebook Pixel Tracking
fbq('consent', 'revoke’);
fbq('consent', 'grant');
// Revoke consent after 'init' is called
fbq(‘Init', '<your pixel ID>’);
fbq('consent', 'revoke’);
fbq('track', 'PageView');
// Once the consent has been granted
fbq('consent', 'grant');
22. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
“Revoke” stays as the default option
23. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Create cookie based on the button click
Developers Console
24. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Create a 1st Party cookie variable in Tag Manager
User defined
variable
25. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Fill in the cookie name as mentioned in dev. console
26. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
GTM variable will contain the same value as of the cookie
27. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
GTM Variable “1stCookie - Facebook Pixel Consent” Value
Match the variable value to “Revoke” & “Grant”
“user_denied_permission" fbq('consent', 'revoke’);
“user_gave_permission" fbq('consent', 'grant');
Facebook Pixel Code
Scenario 1: User doesn’t choose any consent
Scenario 2: User allows the consent
28. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Modify Pixel base code with lookup table variable
Variable value instead of “revoke” or “grant”
29. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
One more thing!
30. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
When accepted, pixel runs only on the next page (refresh)
A classic click tracking (via. Tag Manager) can solve this issue
31. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Run the “Grant” commant on “Zustimmen” button click
32. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Tip 2:
Sending events
selectively to different
Pixels
33. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Sending events selectively to different Pixels
fbq('init', '<PIXEL_A>’);
fbq('init', '<PIXEL_B>’);
fbq('track', 'PageView’); //fire PageView for both initialized pixels
// only fire the Purchase event for Pixel A
fbq('trackSingle', '<PIXEL_A>', 'Purchase’, {
value: 1,
currency : EUR’,
});
// only fire the custom event ”OpenApplication” for Pixel B
fbq('trackSingleCustom', '<PIXEL_B>’, OpenApplication’,{
//optional parameters
});
34. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Facebook Pixel code
“out of the box”
doesn’t work!
Anymore!
35. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Tip 3:
Track Internal &
External links in GTM to
create (Re)-targeting
custom audiences
36. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Create a tag that sends FB click information
Optional
1
2
37. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Create a trigger that runs on external link clicks
Runs on all pages
Everywhere except your own website
3
38. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Alternatively, you run it on inbound links as well
Runs on all pages
On your own website pages
3
39. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Test it in preview in debug mode
Event runs on external link click
Information is sent
to Facebook
4
40. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Tip 4:
Delaying pixel fire on
your website
41. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Clicky users are expensive
42. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Delaying Pixel to improve data quality on Facebook
6 seconds
Fires on all pages
43. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Delaying Pixel to improve data quality on Facebook
Runs after 6 seconds
44. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Tip 5:
Running pixel on
YouTube video view on
website
45. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
A classic ToFU video campaign + Custom Audience
46. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Enable the built-in video variables in GTM
1
47. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Create a Tag that sends video play data to FB
2
48. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Create a trigger that runs on video play percentages
4
50. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Tip 6:
Installing Pageview
Counter via GTM
51. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Create a cookie that saves the page view count
52. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Add Pageview counter to the cookie
53. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Create a trigger for 5 or more page views
54. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Check the pageview’s live
55. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Use Case: Installing Pageview counter via. GTM
› Show visitor a custom popup’s to website visitors with offers, MailChimp signups
after they have visited of instance 5 pages
› Send custom events via this trigger to send engagement data to Facebook & Google
Analytics for better custom audiences
› Use this trigger to personalize the website/ pricing based on the pageviews user
have had
› For instance: If you have a pricing page with price calculator, you can attach the
calculator’s results (price) to that particular visitor. This way you’ll see how visitors
with different price ranges are behaving on your site.)
56. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Tip 7:
Detecting & sending
user device to
Facebook
57. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Sending device info to Facebook Pixel
58. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
User-defined variable
59. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Create a lookup table variable and assign the right values
Add lookup variable to the pixel
tracking code
60. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Tip 8:
Use DataLayer to teach
Facebook Pixel
62. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Use DataLayer.push() to send infomation to Facebook
via. Google Tag Manager
63. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Create a new Data Layer Variable
64. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Save Data Layer values into the variables
Tag Manager Debug Mode
65. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Send dynamic values to Facebook via. variables
ViewContent – Product Page
>
DataLayer Variables
66. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Creating product sets with multiple rules
Use case
Branch office
Job category
67. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Bonus Tip:
Advanced Matching of
User Data
68. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Automatic Advanced Matching
Advanced Matching for Pixels
fbq('init', '{facebook-pixel-id}', {
em: ‘{{_email_}}’, // Values will be hashed
fn: ‘{{_first_name_}}’, // automatically by the pixel
ln: ‘{{_phone_number}}’ // using SHA-256
...
});
Manual Advanced Matching
69. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Summary
70. AllFacebook Advance · Power FB Pixel with Google Tag Manager · Rahul Agarwal
Rahul Agarwal
r.agarwal@trenkwalder.com
M: +49 (0)1515 2626 540
group.trenkwalder.com
www.linkedin.com/rahulagrwl19
Thank you
for your
attention.