-
-
Notifications
You must be signed in to change notification settings - Fork 19
Using the Google Analytics Javascript Library
Will Strohl edited this page Sep 30, 2018
·
14 revisions
How do you use the Google Analytics Autotrack Javascript Library extension? It's simple:
- Install it into DNN like you would any other extension.
- (Only if necessary) Update Google Analytics in DNN to use the Universal Analytics:
- Update your Google Analytics script (SiteAnalytics.config) using the Configuration Manager to use the plugins you desire.
- Save your updates.
- Add a reference to this library using your preferred method (there are more than the 2 listed below):
- Add it to your theme using CRM markup:
<%@ Register TagPrefix="dnn" TagName="JavaScriptLibraryInclude" Src="~/admin/Skins/JavaScriptLibraryInclude.ascx" %>
<dnn:JavaScriptLibraryInclude runat="server" Name="GoogleAnalytics-Autotrack" /> - Add it programmatically in a theme or module using CRM in code-behind:
using DotNetNuke.Framework.JavaScriptLibraries;
JavaScript.RequestRegistration("GoogleAnalytics-Autotrack");
- Check your GA dashboard in 24 hours to see the new data being tracked.