Basically, I'm trying to find a way to efficiently fire tags using Adobe DTM in Angular without having to change the page or write custom script for every rule that shouldn't apply to all pages. It seems that adding _satelitte.track()
to a page to get a new tag to fire would severly limit the benefit of using DTM being that you'd have to either add new _satellite.track() calls to a page or add custom code for new rules. Ideally, I'd like a solution that would allow non-developers to interact with DTM on a regular basis without additional help.
I believe that _satellite.pageBottom()
is what tells the satellite object that a page load has occured. I'm attempting to call _satellite.pageBottom() to mimic a page load any time the route changes. As an aside, as more sites go to angular/one-page-apps it seems like it would make sense have an additional function call that would tell the satellite object that a page load has occured.
.config(function($routeProvider, $httpProvider){$routeProvider.when('/one', {templateUrl: 'view1.html',controller: 'Data1Controller'}).when('/two', {templateUrl: 'view2.html',controller: 'Data2Controller'}).when('/three', {templateUrl: 'view1.html',controller: 'Data3Controller'}).when('/four', {templateUrl: 'view2.html',controller: 'Data4Controller'}).when('/five', {templateUrl: 'form.html',controller: 'FormController'}).otherwise({controller: "Default",templateUrl: 'default.html'});$httpProvider.interceptors.push('CacheBusterInterceptor');}).run(function($rootScope){$rootScope.$on('$routeChangeStart', function(){_satellite.pageBottom();});});
This has worked well for me in other situations where I want to mock a page load but it's not working with the _satellite.pageBottom()
call and I am at a loss how I might get DTM to work in Angular without using the direct call rules. Any advice on getting either this way to work or another work around to having to make changes to the code on the page yet still allowing non-developers to use DTM?
Thanks a lot!