DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Google Analytics - No Results

 4 Replies
 1 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 9
New Around Here

(Repost from FB DNN Connect Group) I have 2 portals on one 9.3.2 instance. Google analytics works in one (Portal 0) and not in the other (Portal 1). Confirmed the settings are identical in both portals (different tracking#), send test data from Analytics properly 'finds' the site (Portal 1). Any thoughts or recommendations would be much appreciated! Thanks!
Additional Info:
* Analytics Code on both sites is correct, and confirmed to match the Google Script. Tracking numbers are the only difference.
* Both are SSL secured, site maps are correct.
* DIFFERENCE- Important? -- One thing I just discovered that is different between the two - not sure of the significance (old sites) -- the working site has this code snippet in the Head section, starting at line 6. It is absent from the non-working site (UA id replaced with X's)

<!-- Global site tag (gtag.js) - Google Analytics -->

 

New Around Here
Posts: 9
New Around Here
FWIW, this is my SiteAnalyticsConfig file:


   
       
            DotNetNuke.Services.Analytics.GoogleAnalyticsEngine, DotNetNuke
            Head
            False
           
               
               
           ]]>
           

       

   
Senior Member
Posts: 1322
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!

Do you see JS errors in the browser console? (F12)

New Around Here
Posts: 9
New Around Here
Yes, one.
11 Uncaught SyntaxError: Unexpected token ')'

However, this same error also appears on the working site, albeit on a different line (21), and both are in the Google code.


Thank you!
New Around Here
Posts: 9
New Around Here
I figured it out. The google analytics connector was correctly configured in both sites, however....as I mentioned they are old sites, and previously had embedded the 'original' Google supplied code into the Site Settings/Site Behavior Page Output Settings -- on the working site 0 only. The other site - site 1 - not working only had the analytics connector, not the 'original' code from google. So, apparently the combo of DNN/Google somehow disallowed the connection with just the analytics connector on site 1. Once I pasted the 'original' google code into the page output settings, it began working immediately. To confirm, I stripped out the 'original' code from both sites, just leaving the Analytics Connecter, and the connection to google stopped. Once I pasted the 'original' code into the Page Output Settings on BOTH sites, it started working again. So, in short, it seems like there may be a bug with multi-portal sites with the Google Analytics connector. Other single site properties with just the Analytics Connector work great.

Thank you to everyone for your help!

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved