Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 2.33 KB

README.md

File metadata and controls

59 lines (42 loc) · 2.33 KB

Launch, by Adobe logo

Launch, by Adobe

homepage: Launch, by Adobe
docs: developer.adobelaunch.com/
import: import { Angulartics2LaunchByAdobe } from 'angulartics2';

Initial Setup

Add your Launch embed code to the end of your head tag, as usual.

You can either add just the embed code with "async", or non-async embed code in the head plus the _satellite.pageBottom() snippet at the end of the body.

Note: this provider works with DTM, too.

Include it in your application

Bootstrapping the application with Angulartics2 as provider and injecting both Angulartics2 and Angulartics2LaunchByAdobe (or any provider) into the root component will hook into the router and send every route change to Launch, where it can be used for Analytics tracking or a lot of other things.

// component
import { Angulartics2LaunchByAdobe } from 'angulartics2';

@Component({ ... })
export class AppComponent {
  // import Angulartics2LaunchByAdobe in root component
  constructor(angulartics2LaunchByAdobe: Angulartics2LaunchByAdobe) {
    angulartics2LaunchByAdobe.startTracking();
  }
}
// bootstrap
import { Angulartics2Module } from 'angulartics2';
import { Angulartics2LaunchByAdobe } from 'angulartics2';

@NgModule({
  imports: [
    ...
    // import Angulartics2LaunchByAdobe in root ngModule    
    Angulartics2Module.forRoot();
  ],
})

Setting Up Tags

Once set up, Angulartics usage is the same regardless of provider. Route changes will be tracked using a "Direct call" Event named "pageTrack", and events or activities can be tracked using a "Direct call" Event named "eventTrack".

Now is the time to setup tracking in Launch. Here is a post explaining how a basic tracking setup can be done.

For detailed instructions on how to send tracking events in a component or in a template check out the documentation for Tracking Events.