Skip to content

fredericharnois/web-notifications-gtm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Adding Web Notifications Through GTM

This is a method to implement the Notifications API on any website through Google Tag Manager.

Setup

In order to limit notifications to one per session, you'll want to create a 1st Party Cookie Variable in GTM called "Session Alive" with Cookie Name set to "session":

Alt text

You can then simply copy and paste the code in GTM as a tag.

Credits

This is based on freeCodeCamp.org's Desktop Notifications - Beau teaches JavaScript and Simo Ahava's Send Weather Data To Google Analytics In GTM V2 .

About

Implement the Notifications API on any website through Google Tag Manager.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published