aemsites / 888de

Apache License 2.0
0 stars 0 forks source link

Homepage: There are no GA events for top banner/slider, offer boxes and login pop up #191

Closed jeric888williamhill closed 2 months ago

jeric888williamhill commented 3 months ago

Hi @helms-charity ,

Please see bug details below:

Steps to Reproduce:

  1. Access https://eds-www.888.de/
  2. Click any CTA in the image below.
  3. Notice that there are no GA events present upon clicking the CTAs.

image

image

kailasnadh790 commented 3 months ago

@jeric888williamhill I can see the events being tracked image

what plugin you use to test these?

jeric888williamhill commented 3 months ago

Hi @kailasnadh790,

I'm using event tracking tracker plugin in chrome. Upon checking again, the GA events shows in top banner slider and offer boxes. But for "Einloggen" or login popup, still no GA events there. Please see below screenshot for the events that show upon clicking the login popup.

image

kailasnadh790 commented 3 months ago

@jeric888williamhill

https://github.com/aemsites/888de/assets/53608019/d469a860-1978-40f4-9260-cf40199bd2e3

I am seeing events firing on click of images on login popup... there is no events defined on "Einloggen" even on the live site.

jeric888williamhill commented 3 months ago

Hi @kailasnadh790, let's wait for issue #192 to be fixed. Maybe this is the reason why the GA events does not fire correctly on my end.

kailasnadh790 commented 3 months ago

@jeric888williamhill yes..that makes sense... @dave-fink can you take a look ?

dave-fink commented 3 months ago

This has been resolved.

@rafim888 We see that it is not working on the 404 page, but that is because the SmartButton function is not defined for that page. We believe this must be a CDN level configuration.

image

rafim888 commented 2 months ago

events on login popup are fixed

kailasnadh790 commented 2 months ago

@rafim888 I still see the issue and console errors on the 404 page eg: https://eds-www.888.de/errorpage/

image

jeric888williamhill commented 2 months ago

Hi @kailasnadh790 @dave-fink,

It is verified that there are GA events for top banner/slider, offer boxes and login popups. Closing this issue.

image

Thanks!

jeric888williamhill commented 2 months ago

Hi @rafim888, please see @kailasnadh790 comment.

@rafim888 I still see the issue and console errors on the 404 page eg: https://eds-www.888.de/errorpage/

image

jeric888williamhill commented 2 months ago

Hi @rafim888 , please see dave's comment below:

This has been resolved.

@rafim888 We see that it is not working on the 404 page, but that is because the SmartButton function is not defined for that page. We believe this must be a CDN level configuration.

image

rafim888 commented 2 months ago

@yarivfel (and the team) will have a look

yarivfel commented 2 months ago

From a brief look there is no /scripts/888-main.js on the 404 page. Also I see the onclick contain this character ‘ instead of ' I think this should resolve the problems.

kailasnadh790 commented 2 months ago

thanks for the findings @yarivfel ..now, the smartButtons are functional. However, we still don't see events getting triggered. Can you please have a look at what is missing?

yarivfel commented 2 months ago

Thanks @kailasnadh790 Please change in the onclick instead of "Gtm.Trigger" to be "window.googleTagManager.trigger"

yarivfel commented 2 months ago

@kailasnadh790 Also found and issue with the main image on wide screen image

And in narrow sizes the below payments icons are missing image

kailasnadh790 commented 2 months ago

@yarivfel will fix these. But why is the buttons in the login popup not triggering GA events just on the error page? even with window.googleTagManager.trigger ?

kailasnadh790 commented 2 months ago

@yarivfel Styling issues are fixed. and script is changed as suggested. Still not seeing GA events.

kailasnadh790 commented 2 months ago

@yarivfel It was found that datalayer object definition was missing. Now that is added, atleast login popup icon tracking is working...still, tracking of button clicks on the body not working.

yarivfel commented 2 months ago

I got lost now. where should I test it now?

helms-charity commented 2 months ago

@yarivfel you can test at https://stage-www.888.de/aaa/ (or similar nonsense page). image

yarivfel commented 2 months ago

Thanks checking on that URL I do get the events. image But I do understand now that this works only if I wait for few seconds then click on the CTA's. If I click the CTA's as soon the page load, it's not working.

kailasnadh790 commented 2 months ago

@yarivfel yes..that is expected. In AEM, we are loading GTM after 3s to improve page performance.

In addition to scripts.js, there is the commonly-used delayed.js. This is a catch-all for libraries that need to be loaded on a page but should be kept from interfering with the delivery of the page. This is a good place for code that is outside of the control of your project and usually includes the martech stack and other libraries.