Table of Content
- Portal Configuration
- Host Configuration
- Event tracking
- Enabling Google Analytics Universal
Thanks for choosing DNN Google Analytics Advanced by weweave! DNN Google Analytics Advanced lets you integrate Google Analytics into your DNN portal without any coding, offering a lot more features than DNN’s built-it Google Analytics module. It lets you track events (such as downloads, search requests, dead links or outbound link clicks), provides realtime download statistics, adds management and tracking of redirects and much more.
If nothing else is stated, this documentation refers to the latest available version of DNN Google Analytics Advanced.
In order to use DNN Google Analytics Advanced, make sure your environments meets the following requirements:
- For DNN Google Analytics Advanced 01.XX.XX: DNN >= 07.03.01
- For DNN Google Analytics Advanced 02.XX.XX: DNN >= 08.00.00
- For DNN Google Analytics Advanced 03.XX.XX: DNN >= 09.00.00
- Google Analytics account
- DNN Google Analytics (download here)
- License key for use in production (get license key here or request a free trial license key)
Please follow these steps to set up DNN Google Analytics Advanced:For version 03.XX.XX
- Download DNN Google Analytics Advanced from the download page.
- Log in to your DNN installation as host admin and select “Settings > Extensions” in the Persona Bar.
- Select “Install Extension” and follow the installation process.
- Press F5 or reload the page, to show the new Persona Bar entry “Settings > Google Analytics Advanced”.
- For each of the affected portal, enter your Google Analytics Tracking ID and your license key under the new Persona Bar entry “Settings > Google Analytics Advanced”
- Download DNN Google Analytics Advanced from the download page.
- Log in to your DNN installation as host admin and navigate to “Host > Extensions”.
- Select “Install Extension Wizard” and follow the installation process.
- After a successful installation you should see two new menu items: “Google Analytics Advanced” under “Admin” and “Host”. The portal-specific configuration can be performed under “Admin > Google Analytics Advanced”, whereas the global configuration can be performed under “Host > Google Analytics Advanced”.
- For DNN Google Analytics Advanced 02.03.00 and newer, enter the Google Analytics Tracking ID under “Admin > Google Analytics Advanced” for each of the affected portal. For older versions of DNN Google Analytics Advanced, enter your Google Analytics Tracking ID under “Admin > Google Analytics” (this is DNN’s standard Google Analytics module).
- Enter your license key under “Admin > Google Analytics Advanced”.
Please follow these steps to upgrade your existing DNN Google Analytics Advanced module installation:
- Download the latest version of DNN Google Analytics Advanced for your DNN version from the download page.
- Make sure that your license key is still valid before performing the upgrade.
- Log in to your DNN installation and select “Settings > Extensions” (DNN 9) or go to “Host > Extensions” (DNN 7 or 8).
- Select “Install Extension” (DNN 9) or “Install Extension Wizard” (DNN 7 or 8) and follow the process.
The actual configuration of DNN Google Analytics Advanced is performed portal-specific under “Settings > Google Analytics Advanced” (for version 03.XX.XX) or “Admin > Google Analytics Advanced” (for version 01.XX.XX and 02.XX.XX).
- Tracking ID: Your portal’s Google Analytics tracking ID
- Track for admins: If unchecked, logged-in site-admins will not be tracked
- Anonymize IP: Activates IP address anonymization (see this Google article)
- Advanced mode: Disables DNN’s built-in Google Analytics engine in favor of DNN Google Analytics Advanced’s additional functionalities. If checked, your existing customizations of SiteAnalytics.config in your website’s root directory (if any) will be disabled.
- Google Analytics script type: Universal or Classic. This option is only available, if “Advanced mode” is enabled.
- Enable User-ID feature: Select to enable Google Analytics Universal’s User ID feature (see here for more information). This option is only available, if “Google Analytics script type” is set to “Universal”.
weweave.dnngaa.trackingId: Tracking ID
weweave.dnngaa.tabPath: DNN Tab Path
weweave.dnngaa.tabId: DNN Tab ID
weweave.dnngaa.tabName: DNN Tab Name
- License key: Your purchased DNN Google Analytics Advanced license key
On the “Redirects” tab you can set up redirects which are to be tracked in Google Analytics as Events. This feature is available as of version 02.01.00. You can use this feature i.e. for nice campaign URLs, QR Codes or newsletter deep links.
Please see section “Event tracking > Redirects” below for details about which event properties will be tracked for redirects.
When editing a redirect, you can set the following properties:
- Redirect Name: A unique name for your redirect which is being reported to Google Analytics as “Event Action”
- Priority: If multiple patterns match, you can control the priority with which this rule is being considered for a redirect
- Requested URL: Requested URL (regular expression/regex)
- Requested URL Format: Absolute, Relative, or RelativeDnnRoot (if your DNN portal is served from t a sub-directory, such as www.website.com/portal)
- Requested URL Ignore Query: Perform case-insensitive query string matching
- Requested URL Ignore Case: Perform case-insensitive URL matching
- Force Login: Check if you want your visitor to be logged in before performing the redirect (if he/she isn’t already logged in)
- Enabled: Check if this redirect is active
- Redirect URL: Absolute or relative target URL that is being redirected to
If you are the DNN Host Admin, you can select “Settings > Google Analytics Advanced” (for version 03.XX.XX) and switch to the “Host” tab or go to /Host/Google-Analytics-Advanced (for version 01.XX.XX and 02.XX.XX) to get an overview of your portal’s Google Analytics implementations. This is especially useful if you run multi-portal instances. As of now, there is nothing you can configure here – such options may follow in a future release.
The following sections describes the properties that are tracked for the specific events (like downloads).
The following properties are tracked for download tracking:
- Event Category: Download
- Event Action:
- DigitalAssets: File was downloaded via the Digital Assets module (click right on file and select “Download”).
- LinkClick: (Protected) file was downloaded via the LinkClick handler (download links using the pattern http://your-domain.com/LinkClick.aspx?fileticket=XXXXXXXX&portalid=X).
- Standard: (Non-protected) file was downloaded via a direct link.
- Event Label: File name (incl. relative path) of the downloaded file.
The following properties are tracked for search requests:
- Event Category: Search
- Event Action:
- Preview: Search request was submitted via quick search in header bar.
- Standard: Search request was submitted via search page.
- Event Label: Query string
Page not found / 404 requests
The following properties are tracked for page not found / 404 requests:
- Event Category: Not Found
- Event Action: URL that produces the 404 error.
- Event Label: Referrer (if known) or “No Referer” – useful for finding the source of dead links.
The following properties are tracked for outbound link tracking:
- Event Category: Outbound Link
- Event Action: Requested URL.
- Event Label: Referral URL.
The following properties are tracked for redirects:
- Event Category: Redirect
- Event Action: Redirect name
- Event Label: Redirect URL
- weweave.dnngaa.optOut() – call this function to opt out the current user
- weweave.dnngaa.isOptedOut() – calling this function returns true if the user has opted out, or false if he/she did not
Example for adding a link where the user can opt-out:
Enabling Google Analytics Universal
Google Analytics Universal is the recommended way of integrating Google’s tracking engine. DNN relies on Google Analytics Classic and does not support Universal out of the box. However, you can easily use DNN Google Analytics Advanced for tracking your impressions with Google Analytics Universal:
- After installing DNN Google Analytics Advanced, select “Settings > Google Analytics Advanced” (for version 03.XX.XX) go to /Admin/Google-Analytics-Advanced (for version 01.XX.XX and 02.XX.XX).
- Enable “Advanced mode” by checking the appropriate check box.
- Make sure “Google Analytics script type” is set to “Universal”.
- Click “Update” to save your changes.
Enabling debug logging
Add the following lines right before the closing “</log4net>” to the file DotNetNuke.log4net.config which you’ll find in your website’s root directory.
<logger name="weweave.DnnGoogleAnalyticsAdvanced"> <level value="Debug" /> </logger>
Debug output will be written into the log files in this directory: Portals\_default\Logs
Outbound links are not tracked on sites running on localhost
When outbound links are not tracked on sites running on localhost, open DNN’s Google Analytics admin page (/Admin/Google-Analytics) and enter the following in the field “URLParameter”:
After installing version 03.XX.XX localizations are missing
Due to a bug in DNN 9 the localizations may not be loaded after installing the module (see DNN-9636). As a workaround, please delete the .resources files in the directory DesktopModules\Admin\Dnn.PersonaBar\Resources and reload the website.
You can easily remove DNN Google Analytics Advanced from your DNN installation by uninstalling the extension. Please select “Showing: Persona Bar” on the extensions page for version 03.XX.XX.