Search

Contents

Revindex Storefront

Export Print

Analytics

Revindex Storefront supports Web site tracking of ecommerce transactions using Google Analytics. This feature allows you to track your site traffic and report on products purchased and order amounts. 

You must first have a valid Google Analytics account. You also need to enable ecommerce tracking:
  1. Click the Admin tab at the top right of any screen in Google Analytics.
  2. From the Account Administration screen, click the name of the account and then the name of the property that has the profile you want to enable Ecommerce Tracking for.
  3. Use the Profile drop down menu to select the profile you want. Click the Profile Settings tab. Under the E-Commerce Settings section, select Yes, an E-Commerce Site/App and save.

For newer DNN 9 and above, under your Web site's \Portals\0 folder (where 0 is your portal ID). Make sure you create or upload GoogleAnalytics.config file with the following content. Replace the value of the tracking ID (e.g. GTM-XXXXXXX) with your Google assigned Tracking ID.

<?xml version="1.0" encoding="utf-8"?>
<AnalyticsConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Settings>
    <AnalyticsSetting>
      <SettingName>TrackingId</SettingName>
      <SettingValue>GTM-XXXXXXX</SettingValue>
    </AnalyticsSetting>
    <AnalyticsSetting>
      <SettingName>UrlParameter</SettingName>
      <SettingValue />
    </AnalyticsSetting>
    <AnalyticsSetting>
      <SettingName>TrackForAdmin</SettingName>
      <SettingValue>true</SettingValue>
    </AnalyticsSetting>
  </Settings>
</AnalyticsConfig>

For older DNN version 8 or under, you can simply enable Google Analytics tracking under your Web site's Admin > Google Analytics page. Enter the Google Analytics Web Property ID (UA-XXXXX-Y) for your Tracking ID value. This will enable analytics tracking for all your Web pages.

Finally, to enable ecommerce transaction tracking, you need to enable the Analytics feature under Configuration > General. You can then enable the Google Analytics under the Storefront's Configuration > Analytics menu.

If you have everything properly setup, the system will automatically inject the Google Analytics tracking code in the confirmation page after checkout. You should find a snippet Javascript code that resembles "_gaq.push('_addTrans'  ...." or ga('ecommerce:addTransaction', ... in your HTML source.

Google Universal Analytics

Google recently launched a new analytics engine and is recommending all users to move to the new platform. The Storefront is capable of emitting code that supports both the Classic and new Universal Analytics code. To enable the new Google Universal Analytics code, you must update the code contained in your SiteAnalytics.config file located under your Web site's root folder or perform the update from the Host > Configuration Manager page (select "SiteAnalytics.config").

<?xml version="1.0" encoding="utf-8" ?>
<AnalyticsEngineConfig>
    <Engines>
        <AnalyticsEngine>
            <EngineType>DotNetNuke.Services.Analytics.GoogleAnalyticsEngine, DotNetNuke</EngineType>
            <ElementId>Head</ElementId>
            <InjectTop>False</InjectTop>
            <ScriptTemplate>
                <![CDATA[     

                <script type="text/javascript">

                      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
                      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
                      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
                      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

                      ga('create', '[TRACKING_ID]');
                      ga('send', 'pageview');

                </script>
           ]]>
            </ScriptTemplate>
        </AnalyticsEngine>
    </Engines>
</AnalyticsEngineConfig>

 

Google Tag Manager

If you prefer to use Google Tag Manager to manage all their different tracking codes, you can modify the SiteAnalytics.config file to include your Google tag manager codes.

<?xml version="1.0" encoding="utf-8"?>
<AnalyticsEngineConfig>
  <Engines>
    <AnalyticsEngine>
      <EngineType>DotNetNuke.Services.Analytics.GoogleAnalyticsEngine, DotNetNuke</EngineType>
      <ElementId>Head</ElementId>
      <InjectTop>True</InjectTop>
      <ScriptTemplate><![CDATA[     
        
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','[TRACKING_ID]');</script>
<!-- End Google Tag Manager -->
        
 ]]></ScriptTemplate>
    </AnalyticsEngine>
    <AnalyticsEngine>
      <EngineType>DotNetNuke.Services.Analytics.GoogleAnalyticsEngine, DotNetNuke</EngineType>
      <ElementId>Body</ElementId>
      <InjectTop>True</InjectTop>
      <ScriptTemplate><![CDATA[     
        
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=[TRACKING_ID]"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
        
 ]]></ScriptTemplate>
    </AnalyticsEngine>
  </Engines>
</AnalyticsEngineConfig>


Comments

Add comment