Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Google Tag Manager recipe for tracking pageview conversions
{
"exportFormatVersion": 2,
"exportTime": "2019-08-22 20:35:42",
"containerVersion": {
"path": "accounts/4701996609/containers/12749914/versions/0",
"accountId": "4701996609",
"containerId": "12749914",
"containerVersionId": "0",
"container": {
"path": "accounts/4701996609/containers/12749914",
"accountId": "4701996609",
"containerId": "12749914",
"name": "Pageview Conversion",
"publicId": "GTM-5KL26VT",
"usageContext": [
"WEB"
],
"fingerprint": "1566506076114",
"tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/4701996609/containers/12749914/workspaces?apiLink=container"
},
"tag": [
{
"accountId": "4701996609",
"containerId": "12749914",
"tagId": "1",
"name": "GA - Contact Thank You Page Conversion",
"type": "ua",
"parameter": [
{
"type": "BOOLEAN",
"key": "nonInteraction",
"value": "false"
},
{
"type": "BOOLEAN",
"key": "overrideGaSettings",
"value": "false"
},
{
"type": "TEMPLATE",
"key": "eventValue",
"value": "10"
},
{
"type": "TEMPLATE",
"key": "eventCategory",
"value": "Conversion"
},
{
"type": "TEMPLATE",
"key": "trackType",
"value": "TRACK_EVENT"
},
{
"type": "TEMPLATE",
"key": "gaSettings",
"value": "{{Settings}}"
},
{
"type": "TEMPLATE",
"key": "eventAction",
"value": "Contact Us"
},
{
"type": "TEMPLATE",
"key": "eventLabel",
"value": "{{Page URL}}"
}
],
"fingerprint": "1566506009822",
"firingTriggerId": [
"5"
],
"tagFiringOption": "ONCE_PER_EVENT",
"monitoringMetadata": {
"type": "MAP"
}
},
{
"accountId": "4701996609",
"containerId": "12749914",
"tagId": "2",
"name": "Set Contact Thank You Cookie",
"type": "html",
"parameter": [
{
"type": "TEMPLATE",
"key": "html",
"value": "<script>\n\t{{JS - setCookie}}('contactThankYou', 'true', 1800000, '/', {{Domain Name}});\n</script>"
},
{
"type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
],
"fingerprint": "1566506010249",
"firingTriggerId": [
"5"
],
"tagFiringOption": "ONCE_PER_EVENT",
"monitoringMetadata": {
"type": "MAP"
}
}
],
"trigger": [
{
"accountId": "4701996609",
"containerId": "12749914",
"triggerId": "5",
"name": "Contact Thank You Page Conversion",
"type": "PAGEVIEW",
"filter": [
{
"type": "CONTAINS",
"parameter": [
{
"type": "TEMPLATE",
"key": "arg0",
"value": "{{Page URL}}"
},
{
"type": "TEMPLATE",
"key": "arg1",
"value": "contact/thank-you"
}
]
},
{
"type": "EQUALS",
"parameter": [
{
"type": "TEMPLATE",
"key": "arg0",
"value": "{{Cookie - contactThankYou}}"
},
{
"type": "TEMPLATE",
"key": "arg1",
"value": "true"
},
{
"type": "BOOLEAN",
"key": "negate",
"value": "true"
}
]
},
{
"type": "CONTAINS",
"parameter": [
{
"type": "TEMPLATE",
"key": "arg0",
"value": "{{document.referrer}}"
},
{
"type": "TEMPLATE",
"key": "arg1",
"value": "formspree.io"
}
]
}
],
"fingerprint": "1566506009447"
}
],
"variable": [
{
"accountId": "4701996609",
"containerId": "12749914",
"variableId": "1",
"name": "Cookie - contactThankYou",
"type": "k",
"parameter": [
{
"type": "BOOLEAN",
"key": "decodeCookie",
"value": "false"
},
{
"type": "TEMPLATE",
"key": "name",
"value": "contactThankYou"
}
],
"fingerprint": "1566506008125",
"formatValue": {}
},
{
"accountId": "4701996609",
"containerId": "12749914",
"variableId": "4",
"name": "Domain Name",
"type": "c",
"parameter": [
{
"type": "TEMPLATE",
"key": "value",
"value": "slideruletech.com"
}
],
"fingerprint": "1566506050178",
"formatValue": {}
},
{
"accountId": "4701996609",
"containerId": "12749914",
"variableId": "2",
"name": "JS - setCookie",
"type": "jsm",
"parameter": [
{
"type": "TEMPLATE",
"key": "javascript",
"value": "function() {\n return function(name, value, ms, path, domain) {\n if (!name || !value) {\n return;\n }\n var d;\n var cpath = path ? '; path=' + path : '';\n var cdomain = domain ? '; domain=' + domain : '';\n var expires = '';\n if (ms) {\n d = new Date();\n d.setTime(d.getTime() + ms);\n expires = '; expires=' + d.toUTCString();\n }\n document.cookie = name + \"=\" + value + expires + cpath + cdomain;\n }\n}"
}
],
"fingerprint": "1566506008719",
"formatValue": {}
},
{
"accountId": "4701996609",
"containerId": "12749914",
"variableId": "3",
"name": "document.referrer",
"type": "j",
"parameter": [
{
"type": "TEMPLATE",
"key": "name",
"value": "document.referrer"
}
],
"fingerprint": "1566506009081"
}
],
"builtInVariable": [
{
"accountId": "4701996609",
"containerId": "12749914",
"type": "PAGE_URL",
"name": "Page URL"
}
],
"fingerprint": "0",
"tagManagerUrl": "https://tagmanager.google.com/#/versions/accounts/4701996609/containers/12749914/versions/0?apiLink=version"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment