swup / ga-plugin Goto Github PK
View Code? Open in Web Editor NEWA swup plugin for integrating Google Analytics 📈
Home Page: https://swup.js.org/plugins/google-analytics-plugin
License: MIT License
A swup plugin for integrating Google Analytics 📈
Home Page: https://swup.js.org/plugins/google-analytics-plugin
License: MIT License
Is it work with gtag.js? analytics.js is the old way to track your website
window.ga("set","title",n)
Was returning an undefined javascript error.
If you're initializing Google Analytics with google tag manager, this might work for you– it solved the problem for me:
var trackingID = window.ga.getAll()[0].get('name');
window.ga(trackingID + ".set","title",n);
The new recommended google analytics tracking code uses a different syntax.
We've update our site manually to run the following on transition complete:
gtag('config', '<TRACKING CODE>', {
'page_title' : document.title,
'page_path': window.location.pathname + window.location.search
});
I would suggest an update that checks for the presence of either configuration for backwards compatibility.
Do you accept PRs?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.