Created
September 22, 2016 17:32
-
-
Save anonymous/6d5d6363e184b743bbc16651ce3d3562 to your computer and use it in GitHub Desktop.
Add Google Adwords to Launchrock
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
// 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