Skip to content

Instantly share code, notes, and snippets.

@szepeviktor
Last active January 4, 2016 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szepeviktor/8568223 to your computer and use it in GitHub Desktop.
Save szepeviktor/8568223 to your computer and use it in GitHub Desktop.
loads Google Remarketing Tag script - nojs image removed
// 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: []
}
};
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