We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi All, I want to give data layer parameters dynamically to each page route in angular. I add bellow script in tag of index.html.
And i push new values for every page route like below
this.router.events.subscribe(event => { if (event instanceof NavigationEnd) { ga('set', 'page', event.urlAfterRedirects); ga('send', 'pageview'); const currentDataLayer = { appId: 'UR_REP', pageName: event.id + '', hostEnv: 'Dev' + event.id, product: 'Opay' + event.id }; window.dataLayer.push(currentDataLayer) } });
But it's consider default values for all pages which i gave in index.html. Please help me how to make in dynamic.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi All,
<script> window.dataLayer = window.dataLayer || []; window.dataLayer.push({ appId: 'UR_REP', pageName: 'test', hostEnv: 'Dev', product: 'OPAY' }); </script>I want to give data layer parameters dynamically to each page route in angular.
I add bellow script in tag of index.html.
And i push new values for every page route like below
this.router.events.subscribe(event => {
if (event instanceof NavigationEnd) {
ga('set', 'page', event.urlAfterRedirects);
ga('send', 'pageview');
const currentDataLayer = {
appId: 'UR_REP',
pageName: event.id + '',
hostEnv: 'Dev' + event.id,
product: 'Opay' + event.id
};
window.dataLayer.push(currentDataLayer)
}
});
But it's consider default values for all pages which i gave in index.html.
Please help me how to make in dynamic.
The text was updated successfully, but these errors were encountered: