Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 1.76 KB

README.md

File metadata and controls

71 lines (52 loc) · 1.76 KB

ember-metrics-adobe-dtm

Greenkeeper badge npm version Build Status Ember Version

ember-metrics adapter for Adobe Dynamic Tag Management

Installation

ember install ember-metrics-adobe-dtm

Usage

// config/environment.js
let ENV = {
  metricsAdapters: [
    {
      name: 'AdobeDTM',
      config: {
        // leave off `src` if the dtm script is already on the page
        src: '//assets.adobedtm.com/your-script-url.js',

        // turns on dtm debug logging
        debug: true
      }
    }
  ]
};

This comes with a test helper to mock the _satellite window object.

import mock, { reset } from 'ember-metrics-adobe-dtm/test-support/mock';

mock();
reset();

// or

mock({
  // optional custom window mock
  window,

  // optional pageBottom callback
  pageBottom,

  // optional track callback
  track
});

reset({
  // optional custom window mock
  window
})

License

This project is licensed under the MIT License.