Advertisement
Guest User

Untitled

a guest
Jul 10th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function () {
  2.   'use strict';
  3.  
  4.   angular.module('shared.services')
  5.     .service('GoogleTagManagerService', GoogleTagManagerService);
  6.  
  7.   function GoogleTagManagerService() {
  8.     var dataLayer = window.dataLayer = window.dataLayer || [];
  9.  
  10.     function push(category, action, label, value, nonInteraction) {
  11.       dataLayer.push({
  12.         event: 'ngTrackEvent',
  13.         attributes: {
  14.           category: category,
  15.           action: action,
  16.           label: label,
  17.           value: value,
  18.           nonInteraction: nonInteraction
  19.         }
  20.       });
  21.     }
  22.     return push;
  23.   }
  24. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement