Page 1 of 1

Mobile Site Analytics Tracking

Posted: Tue Oct 13, 2015 11:34 am
by Kris7
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!

Re: Mobile Site Analytics Tracking

Posted: Wed Oct 14, 2015 1:49 am
by mazhar
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.

Re: Mobile Site Analytics Tracking

Posted: Mon Nov 02, 2015 11:39 am
by Kris7
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>

Re: Mobile Site Analytics Tracking

Posted: Mon Nov 02, 2015 8:57 pm
by mazhar
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.

Re: Mobile Site Analytics Tracking

Posted: Wed Nov 11, 2015 9:32 am
by Kris7
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.

Re: Mobile Site Analytics Tracking

Posted: Thu Nov 12, 2015 5:41 am
by Katie
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