Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
integration:googleanalytics_universal [2014/04/24 16:02] – [Testing] align right sparkweb | integration:googleanalytics_universal [2021/09/10 09:31] (current) – [Setting Up Your Site] adam | ||
---|---|---|---|
Line 17: | Line 17: | ||
<WRAP center round important 80%> | <WRAP center round important 80%> | ||
These instructions are new, and while we have done some testing on the set up - the following are new instructions. Where possible we recommend testing this set up on a test profile before setting to your live analytics account, to ensure it works perfectly for your store. Any questions or issues, please get in touch with us. | These instructions are new, and while we have done some testing on the set up - the following are new instructions. Where possible we recommend testing this set up on a test profile before setting to your live analytics account, to ensure it works perfectly for your store. Any questions or issues, please get in touch with us. | ||
+ | </ | ||
+ | |||
+ | <WRAP center round info 80%> | ||
+ | **Using FoxyCart 2.0?** Google Analytics is now a configuration option within your store' | ||
</ | </ | ||
Line 57: | Line 61: | ||
- Under ' | - Under ' | ||
- Click 'Add Referral Exclusion' | - Click 'Add Referral Exclusion' | ||
+ | - If your own website domain isn't present in that list - add it as well. | ||
- Proceed to the next section | - Proceed to the next section | ||
Line 128: | Line 133: | ||
Proceed to the next section. | Proceed to the next section. | ||
===== Setting Up Your Site ===== | ===== Setting Up Your Site ===== | ||
- | - On your own site, add the following to each page (except your FoxyCart cart, checkout and receipt templates), right before the closing ''</ | + | - On your own site, add the following to each page (except your FoxyCart cart, checkout and receipt templates), right before the closing ''</ |
(function(i, | (function(i, | ||
(i[r].q=i[r].q||[]).push(arguments)}, | (i[r].q=i[r].q||[]).push(arguments)}, | ||
Line 139: | Line 144: | ||
</ | </ | ||
<script type=" | <script type=" | ||
- | | + | |
- | if (arr[' | + | if (arr[' |
- | return true; | + | return true; |
- | } | + | } |
- | if (arr[' | + | if (arr[' |
- | ga(' | + | if (window.ga && ga.loaded) { |
- | ' | + | |
- | jQuery.getJSON(' | + | ' |
- | fcc.events.cart.preprocess.resume(); | + | jQuery.getJSON(' |
- | }); | + | fcc.events.cart.preprocess.resume(); |
+ | }); | ||
+ | } | ||
+ | }); | ||
+ | return " | ||
+ | } else { | ||
+ | return true; | ||
+ | } | ||
+ | } | ||
+ | return true; | ||
+ | }); | ||
+ | //CAUSING LOOPING ISSUES IN CHROME | ||
+ | fcc.events.cart.process.add_pre(function (e, arr) { | ||
+ | if (window.ga && ga.loaded) { | ||
+ | ga(function (tracker) { | ||
+ | jQuery.getJSON(' | ||
+ | fcc.events.cart.process.resume(); | ||
+ | }); | ||
+ | }); | ||
+ | return " | ||
+ | } else { | ||
+ | return true; | ||
} | } | ||
- | }); | ||
- | return " | ||
- | } | ||
- | return true; | ||
- | }); | ||
- | fcc.events.cart.process.add_pre(function(e, | ||
- | ga(function(tracker) { | ||
- | jQuery.getJSON(' | ||
- | fcc.events.cart.process.resume(); | ||
- | }); | ||
}); | }); | ||
- | return " | ||
- | }); | ||
</ | </ | ||
Line 171: | Line 185: | ||
===== Setting Up Your FoxyCart Templates, The Full Details ===== | ===== Setting Up Your FoxyCart Templates, The Full Details ===== | ||
- | Copy the following and paste it above the closing ''</ | + | Copy the following and paste it above the closing ''</ |
=== The Cart Template === | === The Cart Template === | ||
Line 194: | Line 208: | ||
} | } | ||
$(' | $(' | ||
- | e.preventDefault(); | + | |
- | var link_url = jQuery(this).attr(" | + | |
- | var gateway = (jQuery(this).hasClass(" | + | var link_url = jQuery(this).attr(" |
- | ga(' | + | var gateway = (jQuery(this).hasClass(" |
- | ' | + | ga(' |
- | $form = jQuery('< | + | ' |
- | jQuery.getJSON(' | + | $form = jQuery('< |
- | $form.submit(); | + | jQuery.getJSON(' |
- | }); | + | $form.submit(); |
- | } | + | }); |
- | }); | + | } |
+ | }); | ||
+ | } | ||
}); | }); | ||
}); | }); |