I'm trying to add some tracking to my project and the page tracking seem to be working fine but not the event trackning. I've tried with event trackning as following:
<button angulartics2On="click" angularticsAction="Make Offer Click" angularticsLabel="Make Offer Click" angularticsValue="123" [angularticsProperties]="{'productID': 123, 'productTitle': 'A title to die for', 'productCountry': 'EN'}" type="button">Track this</button>
I've also tried to fire the event trackning from the component like this:
import { Angulartics2LaunchByAdobe } from 'angulartics2/launch';
import {Angulartics2} from "angulartics2";
constructor(angulartics2LaunchByAdobe: Angulartics2LaunchByAdobe,
private angulartics2: Angulartics2) {
angulartics2LaunchByAdobe.startTracking();
}
...
this.angulartics2.eventTrack.next({
action: 'Make offer clicked',
properties: {'productID': 123, 'productTitle': 'Product 123', 'productCountry': 'EN'}
});
My app.module looks like this:
import { Angulartics2Module } from 'angulartics2';
import { Angulartics2LaunchByAdobe } from 'angulartics2/launch';
...
imports: [
Angulartics2Module.forRoot()
]
None of the above are showing anything being fired in the Network tab. But I can see that the page tracking event is fired on page load.