improve your online data by using the measurement protocol
TRANSCRIPT
![Page 1: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/1.jpg)
Claudia Kosny Web Analytics specialist & Web developer
![Page 2: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/2.jpg)
![Page 3: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/3.jpg)
![Page 4: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/4.jpg)
https://www.google-analytics.com/collect
Base url
![Page 5: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/5.jpg)
Hit type t=pageview|event|timing|...
https://www.google-analytics.com/collect
Base url
Parameters
![Page 6: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/6.jpg)
Hit type t=pageview|event|timing|...
Document location dl=http...
https://www.google-analytics.com/collect
Base url
Parameters
![Page 7: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/7.jpg)
Hit type t=pageview|event|timing|...
Document location dl=http...
Document title dt=...
https://www.google-analytics.com/collect
Base url
Parameters
![Page 8: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/8.jpg)
Base url List of all parameters
Measurement protocol
![Page 9: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/9.jpg)
Base url List of all parameters
Measurement protocol
analytics.js, SDKs PHP, ASP.NET, C#,…
![Page 10: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/10.jpg)
![Page 11: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/11.jpg)
![Page 12: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/12.jpg)
![Page 13: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/13.jpg)
Google Analytics
Online data via analytics.js
![Page 14: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/14.jpg)
Google Analytics
Offline transactions via measurement protocol
Online data via analytics.js
![Page 15: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/15.jpg)
![Page 16: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/16.jpg)
![Page 17: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/17.jpg)
Add data to existing hits
Add new hits
![Page 18: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/18.jpg)
![Page 19: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/19.jpg)
Step 1: Build tracking url
Base url: https://www.google-analytics.com/collect?v=1&tid=UA-XXXXX-Y
![Page 20: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/20.jpg)
Step 1: Build tracking url
Base url: https://www.google-analytics.com/collect?v=1&tid=UA-XXXXX-Y GA client ID: &cid=123456789.987654321 GA user ID: &uid=user-ab1234
![Page 21: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/21.jpg)
Step 1: Build tracking url
Base url: https://www.google-analytics.com/collect?v=1&tid=UA-XXXXX-Y GA client ID: &cid=123456789.987654321 GA user ID: &uid=user-ab1234 Traffic source data Source: &cs=promo-newsletter Medium: &cm=email Campaign name: &cn=back-to-school-201508-BEFR
![Page 22: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/22.jpg)
Step 1: Build tracking url
Base url: https://www.google-analytics.com/collect?v=1&tid=UA-XXXXX-Y GA client ID: &cid=123456789.987654321 GA user ID: &uid=user-ab1234 Traffic source data Source: &cs=promo-newsletter Medium: &cm=email Campaign name: &cn=back-to-school-201508-BEFR Hit data Hit type: &t=event Event category: &ec=email Event action: &ea=open Event label: &el=back-to-school-201508-BEFR Page path: &dp=/virtual/newsletter/back-to-school-201508-BEFR
![Page 23: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/23.jpg)
Step 1: Build tracking url
Base url: https://www.google-analytics.com/collect?v=1&tid=UA-XXXXX-Y GA client ID: &cid=123456789.987654321 GA user ID: &uid=user-ab1234 Traffic source data Source: &cs=promo-newsletter Medium: &cm=email Campaign name: &cn=back-to-school-201508-BEFR Hit data Hit type: &t=event Event category: &ec=email Event action: &ea=open Event label: &el=back-to-school-201508-BEFR Page path: &dp=/virtual/newsletter/back-to-school-201508-BEFR
![Page 24: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/24.jpg)
Step 1: Build tracking url
Base url: https://www.google-analytics.com/collect?v=1&tid=UA-XXXXX-Y GA client ID: &cid=123456789.987654321 GA user ID: &uid=user-ab1234 Traffic source data Source: &cs=promo-newsletter Medium: &cm=email Campaign name: &cn=back-to-school-201508-BEFR Hit data Hit type: &t=event Event category: &ec=email Event action: &ea=open Event label: &el=back-to-school-201508-BEFR Page path: &dp=/virtual/newsletter/back-to-school-201508-BEFR
![Page 25: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/25.jpg)
Full url: https://www.google-analytics.com/collect?v=1&t=event&tid=UA-8401811-8&cid=123456789.987654321&uid=user-ab1234&cs=promo-newsletter&cm=email&cn=back-to-school-201508-BEFR&ec=email&ea=open&el=back-to-school-201508-BEFR&dp=%2Fvirtual%2Fnewsletter%2Fback-to-school-201508-BEFR
![Page 26: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/26.jpg)
Full url: https://www.google-analytics.com/collect?v=1&t=event&tid=UA-8401811-8&cid=123456789.987654321&uid=user-ab1234&cs=promo-newsletter&cm=email&cn=back-to-school-201508-BEFR&ec=email&ea=open&el=back-to-school-201508-BEFR&dp=%2Fvirtual%2Fnewsletter%2Fback-to-school-201508-BEFR
Step 2: Add image with full tracking url to HTML code of email <img src="https://www.google-analytics.com/collect?v=1&..." alt=""/>
![Page 27: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/27.jpg)
Full url: https://www.google-analytics.com/collect?v=1&t=event&tid=UA-8401811-8&cid=123456789.987654321&uid=user-ab1234&cs=promo-newsletter&cm=email&cn=back-to-school-201508-BEFR&ec=email&ea=open&el=back-to-school-201508-BEFR&dp=%2Fvirtual%2Fnewsletter%2Fback-to-school-201508-BEFR
Step 2: Add image with full tracking url to HTML code of email <img src="https://www.google-analytics.com/collect?v=1&..." alt=""/>
✓
![Page 28: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/28.jpg)
![Page 29: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/29.jpg)
GA client ID
GA user ID GA client ID
GA client ID
![Page 30: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/30.jpg)
![Page 31: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/31.jpg)
✓
?
![Page 32: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/32.jpg)
PDF file requested
Redirect internally to tracking builder
Read GA cookie or create new client ID
Build tracking url and send tracking url to GA
Send requested file to browser
![Page 33: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/33.jpg)
PDF file requested
Redirect internally to tracking builder
Read GA cookie or create new client ID
Build tracking url and send tracking url to GA
Send requested file to browser
✓
![Page 34: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/34.jpg)
Some are filtered by GA
![Page 35: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/35.jpg)
Some are filtered by GA
Not filtered by GA
![Page 36: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/36.jpg)
To do
![Page 37: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/37.jpg)
To do
1. Set parameter for data source to ‘server’
2. Compare hits from data source ‘web’ with ‘server’
3. Filter remaining user agents in tracking script
![Page 38: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/38.jpg)
Returning visitors Read existing cookie and extract ID
![Page 39: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/39.jpg)
Returning visitors Read existing cookie and extract ID
New visitors UUID: 15082013-2148-480b-a3c5-8ad11797c8d1
Use for tracking, then set as cookie for next visit
![Page 40: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/40.jpg)
![Page 41: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/41.jpg)
Redirect to payment website Click on "Pay now" Process payment
Show confirmation message
![Page 42: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/42.jpg)
Redirect to payment website
Redirect back to merchant website
Click on "Pay now" Process payment
Show confirmation message
Confirmation page
Page sends transaction data to GA
![Page 43: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/43.jpg)
Redirect to payment website
Redirect back to merchant website
Click on "Pay now" Process payment
Show confirmation message
Confirmation page
Page sends transaction data to GA
1-8% data loss
![Page 44: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/44.jpg)
Redirect to payment website
Redirect back to merchant website
Click on "Pay now" Process payment
Show confirmation message
Confirmation page
Merchant website backend Backend sends data to GA via
Measurement protocol
Payment confirmation
![Page 45: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/45.jpg)
Example: Prestashop urls
![Page 46: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/46.jpg)
Get GA client ID for visitor via JavaScript
Store in database, connect with order ID
When starting checkout
![Page 47: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/47.jpg)
Get GA client ID for visitor via JavaScript
Store in database, connect with order ID
Fetch stored GA client ID Get order ID from confirmation data
Send data to GA using Measurement protocol
Build tracking url
When starting checkout
When receiving payment confirmation
Fetch details for order
![Page 48: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/48.jpg)
![Page 49: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/49.jpg)
CRM provides lead generation form
Website integrates form
![Page 50: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/50.jpg)
CRM provides lead generation form
Website integrates form
Visitor fills in form
GA client ID is added
Data is stored in CRM
![Page 51: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/51.jpg)
CRM provides lead generation form
Website integrates form
Visitor fills in form
GA client ID is added
Data is stored in CRM
Lead status is changed in CRM
CRM sends data to GA with stored GA client ID
and lead status
![Page 52: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/52.jpg)
Screenshots made using Zoho CRM : https://www.zoho.com/crm/
![Page 54: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/54.jpg)
![Page 61: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/61.jpg)
✓
?
![Page 62: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/62.jpg)
CRM provides lead generation form ✓
Lead status is changed in CRM
CRM sends data to GA with stored GA client ID
and lead status
…arrgh…
![Page 63: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/63.jpg)
![Page 64: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/64.jpg)
![Page 65: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/65.jpg)
![Page 66: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/66.jpg)
versus
![Page 67: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/67.jpg)
No consent yet? Create and remember
GA client ID server-side Report pageview to GA via
measurement protocol
![Page 68: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/68.jpg)
No consent yet? Create and remember
GA client ID server-side Report pageview to GA via
measurement protocol
Next pageview: Tell GA to use created GA client ID
![Page 69: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/69.jpg)
Exclude bots: Same as with tracking of downloads Consistency: Use same configuration for server-side and client-side tracking Distinguish server and client-side tracking: Use 'server' as data source Some data not available: - Size of viewport and screen - browser language - Java & Flash
IP always anonymized: automatically done when using Measurement Protocol
![Page 70: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/70.jpg)
Server-side tracking extra load on server Offline tracking no live internet connection
![Page 71: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/71.jpg)
Server-side tracking extra load on server Offline tracking no live internet connection Use asynchronous tracking:
Store details in database / log file, including exact time of hit
Build tracking url, add queue time
Report pageview to GA via measurement protocol
Up to 4 hours later
![Page 72: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/72.jpg)
You will either get consent from your end users, or provide them with the opportunity to opt-out from the implementations and features you use. Source: Measurement protocol policy
Problem: No way to detect GA opt-out plugin server-side Situation unclear Possible work-around: Check do-not-track header (DNT) for any server-side tracking and mention this in in your privacy statement opportunity to opt out
![Page 73: Improve your online data by using the measurement protocol](https://reader034.vdocuments.us/reader034/viewer/2022050614/5882f2011a28ab3f1e8b5c6b/html5/thumbnails/73.jpg)
• JavaScript tracking not possible everywhere
• Server-side tracking + browser-side tracking = better data
• Anything that happens on your server can be tracked
• Google Analytics is more flexible then you think