Announcement

Collapse
No announcement yet.

Google Analytics stops working and Javscript errors are seen on upload

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Google Analytics stops working and Javscript errors are seen on upload

    There are a couple of Javascript errors that can be seen in the code checker on upload and when viewing the receipt page in the 'Design' tab of the software, one error has the potential to stop Google Analytics working correctly.

    Click image for larger version  Name:	Javascript errors reported on Receipt page.jpg Views:	65 Size:	26.1 KB ID:	552285


    The first error is because the general outer layout has the 'Google Analytics Tracking Code' at the foot of the page whereas in the receipt page, this code must be in the header.

    The solution, is to move the following code: -

    Code:
    <actinic:variable name="GoogleAnalyticsMarkup" value="Google Analytics Tracking Code" />
    from the 'UXSubBodyCode Swift' layout (this will appear as 'Google Analytics Tracking Code' in pink, around line:9) to the 'UXHeadCode Swift' layout, both of these layouts can be found in the group 'UX Template' within 'Design | Library | Layouts'.

    Click image for larger version  Name:	RemoveCode.png Views:	26 Size:	235.6 KB ID:	552289 Click image for larger version  Name:	EnterCode.png Views:	31 Size:	222.2 KB ID:	552286

    The second error can be resolved by going to 'Design | Library | Layouts' and scrolling down to the 'Web Page Inner Layout' and opening the layout 'Receipt Page Bulk RWD'.

    Scroll down to line: 60 where you should see: -

    Code:
    window.uetq.push({ 'gv' : NETQUOTEVAR:ORDERTOTALBASEUNIT, 'gc': 'GBP' });
    and placing single quotation marks around NETQUOTEVAR:ORDERTOTALBASEUNIT so that it looks like this: -

    Code:
    window.uetq.push({ 'gv' : 'NETQUOTEVAR:ORDERTOTALBASEUNIT', 'gc': 'GBP' });
    Once this has been done upload the site for the changes to appear online.
    Attached Files
    Last edited by G.W.Green; 31-Jul-2020, 08:16 AM.
Working...
X