- Jun 16, 2010
- 991
- 130
Hi, I have the following code below. How do I store the client ID and session ID into a cookie (in the browser) using PHP or Javascript?
gtag('get', 'G-654654654', 'client_id', (client_id) => {
// Store the client ID in a variable.
});
gtag('get', 'G-654654654', 'session_id', (session_id) => {
// Store the session ID in a variable.
});
Here is more information about this at https://developers.google.com/tag-platform/gtagjs/reference#get
gtag('get', 'G-654654654', 'client_id', (client_id) => {
// Store the client ID in a variable.
});
gtag('get', 'G-654654654', 'session_id', (session_id) => {
// Store the session ID in a variable.
});
Here is more information about this at https://developers.google.com/tag-platform/gtagjs/reference#get
Last edited: