Simply use this variable to calculate a conversion between Time Units. No more need to use converters or do the calculation yourself, this variable does it for you! Seconds to Milliseconds; Milliseconds to Days;…
Load The Custom Variable Time Converter from the Community Template Gallery
First, go find & load the custom variable to your GTM container.
Add the Cookie Creator Variable to your account
Configure Time Converter Variable
Once you have uploaded the variable in your container, the configuration is very easy to do!
- Fill with a numerical value (you can fill yourself or use a GTM variable that returns a unit value)
- Selecting the starting time value unit
- Selecting the arrival time value unit
Test the variable and check the value
Using the variable for setup Cookie Expire Field To Set in Google Analytics Settings. Example: by default, the Google Analytics cookie is set up for 24 months but with the GDPR & CNIL law in France, we must set up the GA Cookie at 13 months. This variable can help you to convert 13 months in seconds, the time unit expected by this field.
You can also use the Time Converter to setup the lifetime of a custom cookie