2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply
Highlighted

Not showing real time active users---tracking code placed correctly...I think.

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Not showing real time active users---tracking code placed correctly...I think.

 

I have the website up on my desktop and Kindle... 

 

www.elleauteur.com

 

<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src=g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');

ga('create', 'UA-62507525-2', 'auto');
ga('set', { page: '/index', title: 'Home' });
</script>

 

Similar code has worked before for www.redcarsoft.com... now up on my desktop and mobile phone.  This has worked before...

 

thanks in advance,

 

Johnny

1 Expert replyverified_user
Marked as Best Answer.
Solution
Accepted by topic author Johnny C
March

Re: Not showing real time active users---tracking code placed correctly...I think.

Follower ✭ ✭ ☆
# 2
Follower ✭ ✭ ☆

Hi Johnny C

 

The code is not send to Google Analytics.

Please try following code.

 

<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src=g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-62507525-2', 'auto');
ga('set', { page: '/index', title: 'Home' });
ga('send', 'pageview');  // Add
</script>

 

Thanks

 

Not showing real time active users---tracking code placed correctly...I think.

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Okay, I made the change. Checking my report now... let's see what turns up!

Not showing real time active users---tracking code placed correctly...I think.

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Ryota,

 

Thank you! That worked!  However, the earlier code used to work but oh well!

 

Thanks again!

 

Johnny

Not showing real time active users---tracking code placed correctly...I think.

Top Contributor
# 5
Top Contributor

Hi :-)
You seem to have possibly resolved the issue since i first looked at the page

the last line of the tracking code was missing

ga('send', 'pageview');

so no pageview was being sent 

https://developers.google.com/analytics/devguides/collection/analyticsjs/command-queue-reference#sen...

Welcome to Analytics Solutions Click here to read the Community Guidelines:
Experts in the Topic
Bronwyn V