Last active
January 4, 2016 04:19
-
-
Save szepeviktor/8568223 to your computer and use it in GitHub Desktop.
loads Google Remarketing Tag script - nojs image removed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// works with curl.js + js plugin | |
var curl = { | |
paths: { | |
adwords: "//www.googleadservices.com/pagead/conversion.js" | |
} | |
}, | |
// I use WordPress | |
// write your own conversion ID here | |
WP = { | |
adwords: { | |
conversionID: "1234567890", | |
tagParams: [] | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function init_remarketing() { | |
// mini https://github.com/krux/postscribe/ | |
window.document.write = function (html) { | |
var write = document.createElement('div'); | |
//write.style.display = 'none'; -> CSS .doc-write {display: none;} | |
write.className = 'doc-write'; | |
write.innerHTML = html; | |
document.body.appendChild(write); | |
}; | |
window.google_conversion_id = WP.adwords.conversionID; | |
window.google_custom_params = WP.adwords.tagParams; | |
window.google_remarketing_only = true; | |
// 1: shows a 1-line notification to visitors | |
// 2: shows a 2-line notification to visitors | |
// 3: no notification to visitors | |
window.google_conversion_format = 3; | |
curl(['domReady!', 'js!adwords']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment