Freelancer & Founder of Allfacebook.de à AllFacebook.de
27 Mar 2020•0 j'aime•488 vues
1 sur 63
Take your tracking to the next level with the power of Google Tag Manager #AFBMC
27 Mar 2020•0 j'aime•488 vues
Télécharger pour lire hors ligne
Signaler
Médias sociaux
Take your tracking to the next level with the power of Google Tag Manager von Rahul Agarwal auf der virtuellen AFBMC.
https://conference.allfacebook.de/
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, 19th March 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
18. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Using Tag Manager to
power the Pixel
19. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Tip 1:
GDPR complaint FB Pixel
Tracking (via. website
cookie consent forms)
20. 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');
21. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
“Revoke” stays as the default option
fbq('consent’, revoke’);
22. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
So “Pageview” doesn’t load by default
23. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Create cookie based on the button click (I/III)
Default: No cookie | No tracking codes are run
Developers Console
24. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Create cookie based on the button click (II/III)
Scenario 1: Cookie accepted
Developers Console
25. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Create cookie based on the button click (III/III)
Scenario 2: Cookie declined
Developers Console
26. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Create a 1st Party cookie variable in Tag Manager
User defined
variable
27. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Fill in the cookie name as mentioned in dev. console
28. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
GTM variable will contain the same value as of the cookie
29. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Match the variable value to “Revoke” & “Grant” (I/III)
30. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Match the variable value to “Revoke” & “Grant” (II/III)
“user_denied_permission" fbq('consent', 'revoke’);
“user_gave_permission" fbq('consent', 'grant');
Facebook Pixel Code
Scenario 1: User doesn’t choose any consent
31. 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” (III/III)
“user_denied_permission" fbq('consent', 'revoke’);
“user_gave_permission" fbq('consent', 'grant');
Facebook Pixel Code
Scenario 2: User allows the consent
32. 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”
33. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
One more thing!
34. 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
35. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Run the “Grant” commant on “Zustimmen” button click
<script>
fbq('consent', 'grant’);
</script>
36. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Tip 2:
Sending events
selectively to different
Pixels
37. 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
});
38. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Tip 3:
Advanced Matching of
User Data
39. 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
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
Create a timer trigger with the time of your choice
Step 1
6 seconds
Fires on all pages
43. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Create a tag with custom event that runs on timer trigger
Step 2
<script>
fbq(trackCustom’, ‘EVENT NAME’);
</script>
Choose the timer trigger
44. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Check the implementation in GTM debug mode
Runs after 6 seconds
45. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Tip 5:
Installing Pageview
Counter via GTM
46. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Create a 1st Party cookie variable that saves the page
view count
47. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Add Custom HTML tag
This is a Pageview counter for the cookie
<script>
(function(){
var cc = {{Cookie - Page Count}}-0+1
document.cookie="PageCountCookie="+cc+";path=/;";
}());
</script>
48. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Create a trigger for 5 or more page views
Use Case:
› Send custom events via this trigger to send engagement data to Facebook &
Google Analytics
› Show custom popup’s to website visitors with offers, MailChimp signups
› Use this trigger to personalize the website/ pricing based on the pageviews
user have had
49. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Check the pageview’s live in GTM Debugger
50. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Tip 6:
Detecting & sending
user device to
Facebook
51. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Sending device info to Facebook Pixel
52. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Create a Custom Javascript variable
This code returns the value of “True” & “False” for mobile devices
* Find the code on the next page
54. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Create a lookup table variable and assign the right values
55. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Add lookup variable to the pixel tracking code
56. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Tip 7:
Use DataLayer to
teach Facebook Pixel
57. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Check my last year’s presentation on
Dynamic Ads implementation.
https://conference.allfacebook.de/wp-content/uploads/2019/10/AFBMC-facebook-
dynamic-ads.pdf
58. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Use DataLayer.push() to send infomation to Facebook
via. Google Tag Manager
59. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Create a new Data Layer Variable
60. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Save Data Layer values into the variables
Tag Manager Debug Mode
61. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Send dynamic values to Facebook via. variables
ViewContent – Product Page
>
DataLayer Variables
62. AllFacebook Advance ∙ Power FB Pixel with Google Tag Manager ∙ Rahul Agarwal
Creating product sets with multiple rules
Use case
Branch office
Job category
63. 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.