Possible to get gtag client_id and session_id for manual cross domain tracking? #91
Closed
pixelpaulaus
started this conversation in
General
Replies: 1 comment 1 reply
-
Yes, absolutely. The recommended approach is to configure cross-domain measurement via the Analytics interface. However, there might be scenarios where you need to implement a custom solution via the measurement code. This is possible with this module. To retrieve a client ID on the source domain, you use the const { gtag } = useGtag()
gtag('get', 'TAG_ID', 'client_id', (client_id) => {
// Store the client ID in a variable.
});
gtag('get', 'TAG_ID', 'session_id', (session_id) => {
// Store the session ID in a variable.
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
With this module is it possible to get gtag client_id and session_id for manual cross domain tracking?
such as: https://support.google.com/analytics/answer/10071811?hl=en#zippy=%2Cmanual-setup
Beta Was this translation helpful? Give feedback.
All reactions