-
-
Save marcusschiesser/36727dedd8f04046665c081fd8f2d28f to your computer and use it in GitHub Desktop.
Add Google Adwords to Launchrock
This file contains hidden or 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
// you also have to add the JS from the URL http://www.googleadservices.com/pagead/conversion_async.js in the header, | |
// so the function window.google_trackConversion is available | |
angular.module("lrSiteApp").config(function ($httpProvider) { | |
var httpinterceptor = function () { | |
return { | |
response: function (result) { | |
var isCreateReq = result.config.url.match(/site-users\/create/) !== null; | |
if (isCreateReq) { | |
window.google_trackConversion({ | |
google_conversion_id: 1, // get it from the adwords website | |
google_conversion_label: "1", // get it from the adwords website | |
google_remarketing_only: false | |
}); | |
} | |
return result; | |
} | |
} | |
}; | |
$httpProvider.interceptors.push(httpinterceptor); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment