Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- (function() {
- function sendEvent() {
- checkCounter--;
- if (dataLayer && ga && adoric) {
- window.dataLayer.forEach(function(item) {
- if (typeof(item) === 'object' && item.a) {
- window.adoricGeoIpState = item.a.geoData.state_prov;
- window.ga('t0.send', 'event', {
- eventCategory: 'Adoric - Geo IP trigger',
- eventAction: 'Enter',
- eventLabel: item.a.geoData.state_prov
- });
- }
- });
- } else if(checkCounter > 0) {
- setTimeout(sendEvent, 1000);
- }
- }
- var checkCounter = 5;
- setTimeout(sendEvent, 1000);
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment