Using Adobe DTM on an Angular page



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!

Accepted Solutions (1)

Accepted Solutions (1)


Community Manager



I'm working through some old threads and noticed this is stull unanswered. It's likely you've already found a solution to this problem, but I've posted a recommendation below incase.

A while ago we added a few conditions to event based rules for single page apps. If those new conditions don't work for you, direct call rules would be your best option until Adobe Launch is released.

A few resources that may help:


Answers (0)