Add support for analytics pre-pageview userland logic
It allows to prepare data sent during pageview, for instance `ec:setAction` for enhanced e-commerce analytics.
This commit is contained in:
parent
0d92b06c2f
commit
0cac45893b
|
|
@ -1064,6 +1064,10 @@ tarteaucitron.services.analytics = {
|
||||||
ga('set', 'anonymizeIp', true);
|
ga('set', 'anonymizeIp', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof tarteaucitron.user.analyticsPrepare === 'function') {
|
||||||
|
tarteaucitron.user.analyticsPrepare();
|
||||||
|
}
|
||||||
|
|
||||||
if (tarteaucitron.user.analyticsPageView) {
|
if (tarteaucitron.user.analyticsPageView) {
|
||||||
ga('send', 'pageview', tarteaucitron.user.analyticsPageView);
|
ga('send', 'pageview', tarteaucitron.user.analyticsPageView);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue