Mobile Site Analytics Tracking

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
Kris7
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Wed May 27, 2015 4:52 am

Mobile Site Analytics Tracking

Post by Kris7 » Tue Oct 13, 2015 11:34 am

Hello,

I need to know how to get Analytics tracking on my AbleCommerce Gold R6 website. Analytics is tracking e-commerce perfectly on the regular site, but there is no data flowing from the mobile site. In fact, the Analytics code is not even present on the mobile site. In the backend, Analytics is enabled. Numbers are everything and Analytics really helps me see what is going on with my website.

Thanks for any and all help!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Mobile Site Analytics Tracking

Post by mazhar » Wed Oct 14, 2015 1:49 am

It seems like GoogleAnalyticsWidget is missing from your mobile store footer. Please edit Website\Mobile\UserControls\StoreFooter.ascx and locate following linke

Code: Select all

<%@ Register src="~/Mobile/UserControls/Utility/SocialMediaLinks.ascx" tagname="SocialMediaLinks" tagprefix="uc1" %>
and update it like

Code: Select all

<%@ Register src="~/Mobile/UserControls/Utility/SocialMediaLinks.ascx" tagname="SocialMediaLinks" tagprefix="uc1" %>
<%@ Register src="~/Mobile/UserControls/GoogleAnalyticsWidget.ascx" tagname="GoogleAnalyticsWidget" tagprefix="uc" %>
Finally add following code at the very end of the file

Code: Select all

<uc:GoogleAnalyticsWidget ID="GoogleAnalyticsWidget1" runat="server" />
Save the file and confirm that now it emits Google tracking code in mobile pages.

Kris7
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Wed May 27, 2015 4:52 am

Re: Mobile Site Analytics Tracking

Post by Kris7 » Mon Nov 02, 2015 11:39 am

When I implement the code as suggested in the StoreFooter.ascx file as shown below, I receive a 500 internal server error when attempting to load the mobile site. Of course, I took a backup of the original file and restored that. Any idea why this is happening? I have tried both placing the "<uc:GoogleAnalyticsWidget ID="GoogleAnalyticsWidget1" runat="server" />" code outside and inside the <div> tag.

Code: Select all

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="StoreFooter.ascx.cs" Inherits="AbleCommerce.Mobile.UserControls.StoreFooter" %>
<%@ Register src="~/Mobile/UserControls/Utility/SocialMediaLinks.ascx" tagname="SocialMediaLinks" tagprefix="uc1" %>
<%@ Register src="~/Mobile/UserControls/GoogleAnalyticsWidget.ascx" tagname="GoogleAnalyticsWidget" tagprefix="uc" %>
<div id="storeFooter">
    <div class="footerLinks">
        <asp:HyperLink ID="ftrHomeLink" runat="server" NavigateUrl="#" CssClass="tab" Text="Home" />
        <asp:HyperLink ID="ftrAccLink" runat="server" NavigateUrl="#" CssClass="tab" Text="My Account" />
        <asp:HyperLink ID="ftrCartLink" runat="server" NavigateUrl="#" CssClass="tab" Text="Cart" />
        <asp:HyperLink ID="ftrWishlistLInk" runat="server" NavigateUrl="#" CssClass="tab" Text="Wishlist" />
        <asp:HyperLink ID="ftrFullSiteLink" runat="server" NavigateUrl="#" CssClass="tab" Text="Full Store View" />
        <asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
			<AnonymousTemplate>
				<asp:HyperLink ID="ftrLoginLink" runat="server" NavigateUrl="#" class="login" Text="Login" />
			</AnonymousTemplate>
			<LoggedInTemplate>
                <asp:HyperLink ID="ftrLogoutLink" runat="server" NavigateUrl="#" CssClass="tab" Text="Logout" />
			</LoggedInTemplate>
		</asp:LoginView>
    </div>
	<uc1:SocialMediaLinks ID="SocialMediaLinks1" runat="server" />
    <p class="copyright">
	    Copyright 2012 <a href="http://www.ablecommerce.com" class="linked">Able Solutions Corporation</a>.
    </p>
    <uc:GoogleAnalyticsWidget ID="GoogleAnalyticsWidget1" runat="server" />
</div>

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Mobile Site Analytics Tracking

Post by mazhar » Mon Nov 02, 2015 8:57 pm

It would be better if you post the error details that happened after you made above changes. In order to get more error details make following change in your web.config.

Locate this line of code

Code: Select all

<customErrors mode="On" defaultRedirect="~/Errors/GeneralError.aspx">
and then disable custom errors by updating it like this

Code: Select all

<customErrors mode="Off" defaultRedirect="~/Errors/GeneralError.aspx">
Now make the changes to StoreFooter for mobile and see if it provides more details about error 500 and post them here.

Kris7
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Wed May 27, 2015 4:52 am

Re: Mobile Site Analytics Tracking

Post by Kris7 » Wed Nov 11, 2015 9:32 am

I was able to fix it on my own. The problem was that the "~/Mobile/UserControls/GoogleAnalyticsWidget.ascx" and "~/Mobile/UserControls/GoogleAnalyticsWidget.ascx.cs" files were missing from the mobile "Mobile/UserControls" folder so I guess it was crashing when the StoreFooter.ascx tried to call them up.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Mobile Site Analytics Tracking

Post by Katie » Thu Nov 12, 2015 5:41 am

Are you using a really old version? I ask because I just checked our change logs and we added GoogleAnalyticsWidget to the /Mobile/UserControls/ folder, and updated the store footer on Dec. 26, 2013
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Post Reply