unable to remove Google Analytcis code
Last Post 03/17/2015 10:37 PM by Joseph Craig. 3 Replies.
Author Messages
DNN User
Nuke Master
Nuke Master
Posts:284


--
03/16/2015 10:57 AM  
DNN- 07.03.02 (109)

I added Google Analytics code via Admin->Google Analytics. After that I deleted the module from Host->Extension. But the GA code is still showing if I check page source.

view-source:http://thebrightonhotel.co.uk/

I would like to use the Universal Tracking code instead of the code that's showing now.

Please let me know how to remove the code.

Thanks
Joseph Craig
DNN MVP
Posts:11667


--
03/16/2015 3:24 PM  
You probably want to check to make sure that the tracking code isn't hard-coded into the skin file.

I think that simply removing the tracking code from Admin, Google Analytics would do the trick. You don't need to delete the module.

And, since you deleted the module with no change, I would guess that you've either built the code into your skin or have manually configured a file (in the portal root) that adds the code.

I would reinstall the module, check the skin files, and remove the tracking code using the Admin, Google Analytics UI. If the code doesn't disappear ... we'll dig some more.

Joe Craig, Patapsco Research Group
Complete DNN Support
DNN User
Nuke Master
Nuke Master
Posts:284


--
03/17/2015 6:30 AM  
I checked default.aspx file and the skin files. The code was not there.

Please let me know how to remove that code. Or from where can I get that module. I searched for the GA module but didn't find the one that was installed before.

Thanks
Joseph Craig
DNN MVP
Posts:11667


--
03/17/2015 10:37 PM  
You can get the standard DNN GA module from an Install Package. Look in the Install/Module directory.

As to the code, you will find it in your DNN installation's root directory in a file called SiteAnalytics.config. There's a single token in that file.

The tracking code is inserted from the file GoogleAnalytics.config that is stored in the portal's root folder (/portals/0, for example).

These data get merged together and inserted when the page is built. I've never looked at that code, but I think that it is not inserted unless there is a tracking code.

You can test this by deleting GoogleAnalytics.config and seeing if that makes the code go away.

The GA module, I think, simple reads and writes GoogleAnalytics.config and provides a UI for editing the parameters.

Joe Craig, Patapsco Research Group
Complete DNN Support


---