Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the CloseWatcher API to track native modal closes in GA #2269

Open
chrisblakley opened this issue Dec 5, 2023 · 0 comments
Open

Use the CloseWatcher API to track native modal closes in GA #2269

chrisblakley opened this issue Dec 5, 2023 · 0 comments
Labels
Frontend (Script) Related to the client-side JavaScript. Low Priority Not of great importance, and certainly not urgent. Plugin / Library / API For third-party resources such as WordPress plugins, external APIs, and other libraries.
Milestone

Comments

@chrisblakley
Copy link
Owner

CloseWatcher API documentation:

Here is an example of how to use it:

unnamed

Probably something like this:

const watcher = new CloseWatcher();
watcher.addEventListener('close', function(){
    //Send GA4 event here for element close
});
@chrisblakley chrisblakley added Low Priority Not of great importance, and certainly not urgent. Plugin / Library / API For third-party resources such as WordPress plugins, external APIs, and other libraries. Frontend (Script) Related to the client-side JavaScript. labels Dec 5, 2023
@chrisblakley chrisblakley added this to the 12.0 Flame milestone Dec 5, 2023
@chrisblakley chrisblakley modified the milestones: 12.0 Flame, 13.0 Bubble May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend (Script) Related to the client-side JavaScript. Low Priority Not of great importance, and certainly not urgent. Plugin / Library / API For third-party resources such as WordPress plugins, external APIs, and other libraries.
Projects
Analytics Improvements
Awaiting triage
Development

No branches or pull requests

1 participant