angulartics2 custom events are sent to facebook but not to google analytics
up vote
0
down vote
favorite
I use angulartics2 with an angular7 project to fire events to facebook and google analytics.
I have facebook and google analytics configured using google tag manager.
the problem is my custom events are fired and sent to facebook but not to google analytics.
below the <head>
tag I have the google tag manager code.
in the main component typescript file I added the following code:
constructor(
private angulartics2GoogleTagManager: Angulartics2GoogleTagManager,
private angulartics2Facebook: Angulartics2Facebook,
private angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics
) {
this.angulartics2Facebook.startTracking();
this.angulartics2GoogleTagManager.startTracking();
this.angulartics2GoogleAnalytics.startTracking();
...
for example when people add items to cart I want to fire an event about it.
so in my cart service I inject angulartics2 in the constructor:
constructor(@Inject(LOCAL_STORAGE) private storage: StorageService,
private angulartics2: Angulartics2
)
and then where it's relevant I fire the event with the following code:
this.angulartics2.eventTrack.next(action: 'addToCart', properties: category: 'Cart', label: keyName, value: quantity);
using facebook pixel chrome extension I can see that the custom event is detected, using google events chrome extension I can see that no event is detected.
what am I missing? what I didn't configure properly?
google analytics is configured properly in google tag manager, I do see users count and page views count properly.
any information regarding this issue would be greatly appreciated.
thanks
update
some more investigation information thanks to @XTOTHEL.
so in the app.component.ts
constructor I only enabled google tag manager to start tracking.
unfortunately google tag manager is not detecting any events being fired.
attached a screenshot of google tag manager console after adding stuff to the cart and the angulartics2 code of adding addToCart
custom event being fired.
update 2
angular google-analytics google-tag-manager angulartics2
|
show 3 more comments
up vote
0
down vote
favorite
I use angulartics2 with an angular7 project to fire events to facebook and google analytics.
I have facebook and google analytics configured using google tag manager.
the problem is my custom events are fired and sent to facebook but not to google analytics.
below the <head>
tag I have the google tag manager code.
in the main component typescript file I added the following code:
constructor(
private angulartics2GoogleTagManager: Angulartics2GoogleTagManager,
private angulartics2Facebook: Angulartics2Facebook,
private angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics
) {
this.angulartics2Facebook.startTracking();
this.angulartics2GoogleTagManager.startTracking();
this.angulartics2GoogleAnalytics.startTracking();
...
for example when people add items to cart I want to fire an event about it.
so in my cart service I inject angulartics2 in the constructor:
constructor(@Inject(LOCAL_STORAGE) private storage: StorageService,
private angulartics2: Angulartics2
)
and then where it's relevant I fire the event with the following code:
this.angulartics2.eventTrack.next(action: 'addToCart', properties: category: 'Cart', label: keyName, value: quantity);
using facebook pixel chrome extension I can see that the custom event is detected, using google events chrome extension I can see that no event is detected.
what am I missing? what I didn't configure properly?
google analytics is configured properly in google tag manager, I do see users count and page views count properly.
any information regarding this issue would be greatly appreciated.
thanks
update
some more investigation information thanks to @XTOTHEL.
so in the app.component.ts
constructor I only enabled google tag manager to start tracking.
unfortunately google tag manager is not detecting any events being fired.
attached a screenshot of google tag manager console after adding stuff to the cart and the angulartics2 code of adding addToCart
custom event being fired.
update 2
angular google-analytics google-tag-manager angulartics2
If you've setup your tags within GTM, I don't think you would only need to use angulartics2GoogleTagmanager.startTracking(); and not the rest. Can you show a screen capture of the tags within GTM for FB and GA and the triggers associated with each?
– XTOTHEL
Nov 9 at 15:49
@XTOTHEL - i'm guessing i'm missing something... do I need to pre-configure the custom events i'm about to send with angulartics2 in the GTM admin page ? where exactly ?
– ufk
Nov 9 at 19:04
Can you show me an output of GTM’s debug console when you tigger an event?
– XTOTHEL
Nov 9 at 19:42
@XTOTHEL - updated main post. thanks
– ufk
Nov 10 at 10:42
Can you select “interaction” and show me both tags and datalayers tab?
– XTOTHEL
Nov 10 at 15:13
|
show 3 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I use angulartics2 with an angular7 project to fire events to facebook and google analytics.
I have facebook and google analytics configured using google tag manager.
the problem is my custom events are fired and sent to facebook but not to google analytics.
below the <head>
tag I have the google tag manager code.
in the main component typescript file I added the following code:
constructor(
private angulartics2GoogleTagManager: Angulartics2GoogleTagManager,
private angulartics2Facebook: Angulartics2Facebook,
private angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics
) {
this.angulartics2Facebook.startTracking();
this.angulartics2GoogleTagManager.startTracking();
this.angulartics2GoogleAnalytics.startTracking();
...
for example when people add items to cart I want to fire an event about it.
so in my cart service I inject angulartics2 in the constructor:
constructor(@Inject(LOCAL_STORAGE) private storage: StorageService,
private angulartics2: Angulartics2
)
and then where it's relevant I fire the event with the following code:
this.angulartics2.eventTrack.next(action: 'addToCart', properties: category: 'Cart', label: keyName, value: quantity);
using facebook pixel chrome extension I can see that the custom event is detected, using google events chrome extension I can see that no event is detected.
what am I missing? what I didn't configure properly?
google analytics is configured properly in google tag manager, I do see users count and page views count properly.
any information regarding this issue would be greatly appreciated.
thanks
update
some more investigation information thanks to @XTOTHEL.
so in the app.component.ts
constructor I only enabled google tag manager to start tracking.
unfortunately google tag manager is not detecting any events being fired.
attached a screenshot of google tag manager console after adding stuff to the cart and the angulartics2 code of adding addToCart
custom event being fired.
update 2
angular google-analytics google-tag-manager angulartics2
I use angulartics2 with an angular7 project to fire events to facebook and google analytics.
I have facebook and google analytics configured using google tag manager.
the problem is my custom events are fired and sent to facebook but not to google analytics.
below the <head>
tag I have the google tag manager code.
in the main component typescript file I added the following code:
constructor(
private angulartics2GoogleTagManager: Angulartics2GoogleTagManager,
private angulartics2Facebook: Angulartics2Facebook,
private angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics
) {
this.angulartics2Facebook.startTracking();
this.angulartics2GoogleTagManager.startTracking();
this.angulartics2GoogleAnalytics.startTracking();
...
for example when people add items to cart I want to fire an event about it.
so in my cart service I inject angulartics2 in the constructor:
constructor(@Inject(LOCAL_STORAGE) private storage: StorageService,
private angulartics2: Angulartics2
)
and then where it's relevant I fire the event with the following code:
this.angulartics2.eventTrack.next(action: 'addToCart', properties: category: 'Cart', label: keyName, value: quantity);
using facebook pixel chrome extension I can see that the custom event is detected, using google events chrome extension I can see that no event is detected.
what am I missing? what I didn't configure properly?
google analytics is configured properly in google tag manager, I do see users count and page views count properly.
any information regarding this issue would be greatly appreciated.
thanks
update
some more investigation information thanks to @XTOTHEL.
so in the app.component.ts
constructor I only enabled google tag manager to start tracking.
unfortunately google tag manager is not detecting any events being fired.
attached a screenshot of google tag manager console after adding stuff to the cart and the angulartics2 code of adding addToCart
custom event being fired.
update 2
angular google-analytics google-tag-manager angulartics2
angular google-analytics google-tag-manager angulartics2
edited Nov 10 at 15:20
asked Nov 8 at 8:32
ufk
10.4k49165289
10.4k49165289
If you've setup your tags within GTM, I don't think you would only need to use angulartics2GoogleTagmanager.startTracking(); and not the rest. Can you show a screen capture of the tags within GTM for FB and GA and the triggers associated with each?
– XTOTHEL
Nov 9 at 15:49
@XTOTHEL - i'm guessing i'm missing something... do I need to pre-configure the custom events i'm about to send with angulartics2 in the GTM admin page ? where exactly ?
– ufk
Nov 9 at 19:04
Can you show me an output of GTM’s debug console when you tigger an event?
– XTOTHEL
Nov 9 at 19:42
@XTOTHEL - updated main post. thanks
– ufk
Nov 10 at 10:42
Can you select “interaction” and show me both tags and datalayers tab?
– XTOTHEL
Nov 10 at 15:13
|
show 3 more comments
If you've setup your tags within GTM, I don't think you would only need to use angulartics2GoogleTagmanager.startTracking(); and not the rest. Can you show a screen capture of the tags within GTM for FB and GA and the triggers associated with each?
– XTOTHEL
Nov 9 at 15:49
@XTOTHEL - i'm guessing i'm missing something... do I need to pre-configure the custom events i'm about to send with angulartics2 in the GTM admin page ? where exactly ?
– ufk
Nov 9 at 19:04
Can you show me an output of GTM’s debug console when you tigger an event?
– XTOTHEL
Nov 9 at 19:42
@XTOTHEL - updated main post. thanks
– ufk
Nov 10 at 10:42
Can you select “interaction” and show me both tags and datalayers tab?
– XTOTHEL
Nov 10 at 15:13
If you've setup your tags within GTM, I don't think you would only need to use angulartics2GoogleTagmanager.startTracking(); and not the rest. Can you show a screen capture of the tags within GTM for FB and GA and the triggers associated with each?
– XTOTHEL
Nov 9 at 15:49
If you've setup your tags within GTM, I don't think you would only need to use angulartics2GoogleTagmanager.startTracking(); and not the rest. Can you show a screen capture of the tags within GTM for FB and GA and the triggers associated with each?
– XTOTHEL
Nov 9 at 15:49
@XTOTHEL - i'm guessing i'm missing something... do I need to pre-configure the custom events i'm about to send with angulartics2 in the GTM admin page ? where exactly ?
– ufk
Nov 9 at 19:04
@XTOTHEL - i'm guessing i'm missing something... do I need to pre-configure the custom events i'm about to send with angulartics2 in the GTM admin page ? where exactly ?
– ufk
Nov 9 at 19:04
Can you show me an output of GTM’s debug console when you tigger an event?
– XTOTHEL
Nov 9 at 19:42
Can you show me an output of GTM’s debug console when you tigger an event?
– XTOTHEL
Nov 9 at 19:42
@XTOTHEL - updated main post. thanks
– ufk
Nov 10 at 10:42
@XTOTHEL - updated main post. thanks
– ufk
Nov 10 at 10:42
Can you select “interaction” and show me both tags and datalayers tab?
– XTOTHEL
Nov 10 at 15:13
Can you select “interaction” and show me both tags and datalayers tab?
– XTOTHEL
Nov 10 at 15:13
|
show 3 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53203973%2fangulartics2-custom-events-are-sent-to-facebook-but-not-to-google-analytics%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
If you've setup your tags within GTM, I don't think you would only need to use angulartics2GoogleTagmanager.startTracking(); and not the rest. Can you show a screen capture of the tags within GTM for FB and GA and the triggers associated with each?
– XTOTHEL
Nov 9 at 15:49
@XTOTHEL - i'm guessing i'm missing something... do I need to pre-configure the custom events i'm about to send with angulartics2 in the GTM admin page ? where exactly ?
– ufk
Nov 9 at 19:04
Can you show me an output of GTM’s debug console when you tigger an event?
– XTOTHEL
Nov 9 at 19:42
@XTOTHEL - updated main post. thanks
– ufk
Nov 10 at 10:42
Can you select “interaction” and show me both tags and datalayers tab?
– XTOTHEL
Nov 10 at 15:13