elgorditosalsero / react-gtm-hook

Easily manage the Google Tag Manager via Hook
https://elgorditosalsero-react-gtm-hook.netlify.app/
MIT License
220 stars 28 forks source link

Can't see any history tags with basic implementation ? #9

Closed hiahmedhameed closed 4 years ago

hiahmedhameed commented 4 years ago

Hey,

I just implemented basic configuration as follow:


[...]
const {init} = useGTM();

useEffect(() => {
  init({id: environment.gtmId});
}, [init])

We are tracking History API of the browser for SPA. But can't see any tags of my pages!

Do i miss something ?

elgorditosalsero commented 4 years ago

Hi,

the History Change trigger is configured on your GTM?

Will do some test and check into this.

hiahmedhameed commented 4 years ago

Hi @elgorditosalsero

Yep, i already did the configuration. When using react-gtm-module, it works fine but with this module it does not show anything.

Thanks.

elgorditosalsero commented 4 years ago

Hi @hiahmedhameed,

I've done some tests and you're right, I'm 👀 into this.

And next weeks I, probably, will do some refactor to the hook 🎉

elgorditosalsero commented 4 years ago

Hi @hiahmedhameed,

I've done some tests and you're right, I'm 👀 into this.

And next weeks I, probably, will do some refactor to the hook 🎉

Hi @hiahmedhameed

with the latest release, I've fixed the issue of the history navigation.

You could see also a live example here

Try to update the hook and follow the new snippets. Let me know 💯

elgorditosalsero commented 4 years ago

I'm closing the issue due to inactivity.

@hiahmedhameed feel free to reopen if you still have the issue with version 2.x.