ember-google-adwords-remarketing
v2.0.0
Published
Google adwords remarketing support.
Downloads
7
Maintainers
Readme
ember-google-adwords-remarketing
Really simple add on for integrating Adwords Remarketing in ember.
This addon exposes a service called conversion
.
You can use the trackEvent
function to record conversions.
NOTE: this is using the new gtag
script from google. See Changes to the Website Conversion Tracker Tag.
Example:
import Ember from 'ember';
export default Ember.Route.extend({
conversion: Ember.inject.service(),
actions: {
onThingDone(){
this.get('conversion').trackEvent('conversion', 'AW-123456', {value: 100});
}
}
});
Methods:
trackEvent
equates to gtag('event'...)
setConfig
equates to gtag('config'...)
If for some reason the google script doesn't download, we queue requests until it does.
Installation
git clone <repository-url>
this repositorycd ember-google-adwords-remarketing
npm install
Configuration
In config/environment.js
:
module.exports = function(environment) {
let ENV = {
...
googleAdwordsRemarketing: {
enabled: true // required
id: 'AW-123456', // required
conversionLinker: false, // optional
sendPageView: true // optional
},
...