HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Where is the Google Analytics code located in ocPortal

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#74435 (In Topic #15506)
Avatar

Community saint

I have set my Google Analytics Web Property ID in Configuration->Site options and have also checked the "Store full Google Analytics cookies" but I am not getting any updates to my Google Analytics account.

When I check my status in Google Analytics, it reports:
 Waiting for Data
Analytics has been successfully installed and data is being gathered now.

But no data has arrived in days.

I decided to do a "View source" on the home page and I can find no evidence of the Google code snippet - either the old Urchin code or the new Analytics code. Where should this code be located?

Bob

EDIT: I just found the code in the default HEADER.tpl but whenI do a "View source on the home page, I cannot find the code. Why is the code not present?




Last edit: by BobS
Back to the top
 
Posted
Rating:
#74440
Avatar

Community saint

Are you logged in as admin or staff? If so, check out View topic: Google analytics and admin/staff - ocPortal .

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#74504
Avatar

Community saint

temp-

Thanks for the tip. But that is not my issue.

GA says it is receiving data and I know I have had site visitors (because some have joined) and yet nothing appears in the GA stats. I activated the GA tracking code last Thursday I think so there should be results by now.

Bob
Back to the top
 
Posted
Rating:
#74509
Avatar

Community saint

Sorry, should have clarified my answer. I was responding to:
I just found the code in the default HEADER.tpl but whenI do a "View source on the home page, I cannot find the code. Why is the code not present?
As for tracking data, it is supposed to be available in 24 hours.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#74511
Avatar

Community saint

temp1024 said

As for tracking data, it is supposed to be available in 24 hours.
That was my understanding.

The fact that I cannot find the tracking code snipper when I view the source code of a page suggests to me that it is an ocPortal problem.

I have an unmodified HEADER.tpl and just don't understand why the tracking code does not show up on the page.

Thanks for your help.

Bob
Back to the top
 
Posted
Rating:
#74553
Avatar

Community saint

I have confirmed that the GA tracking code snippet is in the default HEADER.tpl:


And I have confirmed that there is no customization to the default HEADER.tpl:


But when I review the source code for the front page of the site, there is no evidence of the code snippet:

Code

<head profile="http://www.w3.org/2003/g/data-view http://dublincore.org/documents/dcq-html/ http://gmpg.org/xfn/11 http://www.w3.org/2006/03/hcard">
   
   <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=ISO-8859-1" />

   
   <meta http-equiv="X-UA-Compatible" content="IE=9" />

   
   

   
   <title>xxxxxxxx</title>
   <meta name="description" content="Welcome to xxxxxxxx Central - a site dedicated to discussing the life and art of a true 20th century master painter." />
   <meta name="keywords" content="xxxxxxxx,painter,artist,Las Vegas,Hollywood,nudes,clowns,portraits,landscapes,lifescapes,Galilee,lost at sea,South Pacific,clownsnudes,oil paintings,sailor,adventurer,voyage" />
   <meta name="copyright" content="Copyright &copy; xxxxxxxx.com 2011. All rights reserved." />
   <meta name="author" content="xxxxxxxx" />
   
   <link rel="canonical" href="http://www.xxxxxxxx.com/start.htm" />
   <link rel="baseurl" href="http://www.xxxxxxxx.com" />
   <link rel="schema.OCPCORE" href="http://ocportal.com/ocpcore.rdf" /><meta name="OCPCORE.Site_NewestMember" content="lildas" /><meta name="OCPCORE.Site_NumMembers" content="14" /><meta name="OCPCORE.Forum_NumTopics" content="10" /><meta name="OCPCORE.Forum_NumPosts" content="20" />
   <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" /><link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" /><meta name="DC.Language" content="EN" /><meta name="DCTERMS.Created" content="2011-05-16" /><meta name="DC.Creator" content="admin" /><meta name="DCTERMS.Modified" content="2011-09-06" /><meta name="DC.Type" content="Comcode page" /><meta name="DC.Title" content="Welcome to xxxxxxxx" /><meta name="DC.Identifier" content="http://www.xxxxxxxx.com/data/pagelink_redirect.php?id=%3Astart" />
   <meta property="og:title" content="Welcome to xxxxxxxx"/><meta property="og:type" content="comcode_page"/><meta property="og:url" content="http://www.xxxxxxxx.com/start.htm"/><meta property="og:site_name" content="xxxxxxxx"/><meta property="og:image" content="http://www.xxxxxxxx.com/themes/xxxxxxxx/images_custom/JRC_logo3-trimmed.png"/>
   <meta name="language" content="EN" />

   
   
      <meta http-equiv="Content-Script-Type" content="text/javascript" />
      <meta http-equiv="Content-Style-Type" content="text/css" />
   
   <meta name="GENERATOR" content="ocPortal" />

   
   <link href="http://www.xxxxxxxx.com/backend.php?mode=news&amp;keep_session=9424920&amp;type=rss" rel="alternate feed" type="application/rss+xml" title="RSS (News)" />
<link href="http://www.xxxxxxxx.com/backend.php?mode=news&amp;keep_session=9424920&amp;type=atom" rel="alternate feed" type="application/atom+xml" title="Atom (News)" />


   
   
   

   
   <link rel="icon" href="http://www.xxxxxxxx.com/themes/xxxxxxxx/images_custom/appleicon.png" />
   <link rel="apple-touch-icon" href="http://www.xxxxxxxx.com/themes/xxxxxxxx/images_custom/appleicon.png" />
   <link rel="shortcut icon" href="http://www.xxxxxxxx.com/themes/xxxxxxxx/images_custom/favicon.ico" type="image/x-icon" />

   
   

   
   
      
      
         <link rel="search" type="application/opensearchdescription+xml" title="xxxxxxxx " href="http://www.xxxxxxxx.com/data/opensearch.php?filter=" />
      
      
      
      
   

   
   
   
   
   

   
   <script type="text/javascript">// <![CDATA[
      
      window.take_errors=true;
      var server_timestamp=1315341017,ocp_lang='EN',ocp_theme='xxxxxxxx',ocp_username='BobS';
   //]]></script>

   
   <style id="style_for_no_cache" type="text/css">
 .float_surrounder, .float_surrounder_precise { overflow: hidden; }
/* IE6 does scrollbars uncontrollably, this is optimised for extreme case of the notes block in the Admin Zone */ .global_helper_panel { min-height: 450px; }

</style>

<link href="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/global.css" rel="stylesheet" type="text/css" />

<link href="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/side_blocks.css" rel="stylesheet" type="text/css" />

<link href="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/polls.css" rel="stylesheet" type="text/css" />

<link href="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/news.css" rel="stylesheet" type="text/css" />

<link href="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/ocf.css" rel="stylesheet" type="text/css" />

<link href="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/iotds.css" rel="stylesheet" type="text/css" />

<link href="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/lightbox.css" rel="stylesheet" type="text/css" />

<link href="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/search.css" rel="stylesheet" type="text/css" />

<link href="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/calendar.css" rel="stylesheet" type="text/css" />



   
   

   
   <script type="text/javascript" src="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/javascript.js"></script><script type="text/javascript" src="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/javascript_ajax.js"></script><script type="text/javascript" src="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/javascript_prototype.js"></script><script type="text/javascript" src="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/javascript_scriptaculous.js"></script><script type="text/javascript" src="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/javascript_scriptaculous_builder.js"></script><script type="text/javascript" src="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/javascript_scriptaculous_effects.js"></script><script type="text/javascript" src="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/javascript_lightbox.js"></script><script type="text/javascript" src="http://www.xxxxxxxx.com/themes/xxxxxxxx/templates_cached/EN/javascript_ajax_people_lists.js"></script>
   

   
   
</head>

I have confirmed that the GA Web Property ID is entered properly in Configuration->Site options and, when I check my GA account, it shows that the account is receiving data. But no data ever arrives - apparently because the code is never executed on my pages.

Can anyone suggest a solution?

Bob
Back to the top
 
Posted
Rating:
#74554
Avatar

Isn't it just as temp said, you're an admin?

Try &keep_su=test on the end of the URL then viewing source again.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#74556
Avatar

Community saint

Sorry about that. I missed the connection with what temp said. You are both correct - the tracking snippet does appear in the header for non-sdmins.

Guess that means I need to track this down from the big GOOG side. Going throughout their help, it kept pointing to the ID and code being in place.

I know I have visitors because they appear in the logs and some have joined the site.

Off to Google to see what help I can get there.

Thanks for your (and temp's) help.

Bob
Back to the top
 
Posted
Rating:
#74634
Avatar

Community saint

Just curious if others are using GA with success.

Just want to know that the code is working.

Thanks for any input.

Bob
Back to the top
 
Posted
Rating:
#74645
Avatar

Community saint

This is most likely solved - I had a trailing space when I entered the Tracking ID. The code should probably strip any spaces as a precaution which would protect doofuses like myself from myself.

Should know tomorrow whether this is working properly.

Now to see why not even my home page is showing in the index (I've got 178 URLs in the index according to Webmaster Tools.)

Bob
Back to the top
 
Posted
Rating:
#74650
Avatar

Community saint

I was going to make a comment about checking for typo's in the Tracking ID, but then I thought to myself:

  1. You almost certainly would have done a copy & paste job, so that shouldn't be the problem.
  2. I'm sure you would have already checked for that. Its too bleeding obvious even for a doofus :) .

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#74652
Avatar

Community saint

temp-

I did copy and paste the code - that's probably why I was so certain that the code could not be wrong. And I did check and still didn't see the space. Talk about seeing what you want to see.

Bob
Back to the top
 
Posted
Rating:
#74660
Avatar

Community saint

To paraphrase the the great singer Dinah Washington:

What a difference a space makes in less than 24 hours.   :thumbs:

Bob
Back to the top
 
Posted
Rating:
#74724
Avatar

Community saint

Yes….finally displayed in the search result 261 times. I need to add some filters so that, for instance, the recommend and print link on each page is not included in the search results.

Turns out that this was another doofus mistake. I had accidentally removed the site password and had been indexed in June so I asked that the site domain.com be removed from the search results. Since I am now using www.domain.com, I completely forgot about the request for exclusion. Asked for re-inclusion this morning and, BAM, I am now included in the search results.

To top that off, my mom dropped by this morning to deliver one of my favorite dishes AND a homemade cheesecake. Pretty hard to be grumpy today.

Bob
Back to the top
 
Posted
Rating:
#74739
Avatar

Honoured member

OMG!

cheesecake  :thumbs:  :offtopic:
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: