This is version #1 and it's something I knocked up in an hour of messing around with API's and the like so it's freely available (not for re-sale) BUT I would appreciate anyone using it putting their hands in their pocket and donating £10 ($15) or more to a charity by way of thank-you... Good deeds should be rewarded or at least paid forward... but I'll let you conscience and the knowledge that Karma generally wins out guide you on that one
Right... code:
Open: /templates/__master/Panels/HTMLHead.html
Find & CUT (Delete)
Code: Select all
<!-- Include visitor tracking code (if any) -->
%%GLOBAL_TrackingCode%%
Code: Select all
<script type="text/javascript" src="%%GLOBAL_ShopPath%%/javascript/jquery.js?%%GLOBAL_JSCacheToken%%"></script>
Code: Select all
<!-- Include visitor tracking code (if any) -->
%%GLOBAL_TrackingCode%%
Open: /includes/display/HTMLHead.php
Find:
Code: Select all
// Include the tracking code for each analytics module
$GLOBALS['TrackingCode'] .= GetTrackingCodeForAllPackages();
Code: Select all
// MOD Woopra Analytics
if(CustomerIsSignedIn()) {
// If they're a customer, set their name so it's available in the templates
$c = GetClass('ISC_CUSTOMER');
$customerData = $c->GetCustomerDataByToken();
$GLOBALS['CurrentCustomerFirstName'] = isc_html_escape($customerData['custconfirstname']);
$GLOBALS['CurrentCustomerLastName'] = isc_html_escape($customerData['custconlastname']);
$GLOBALS['CurrentCustomerEmail'] = isc_html_escape($customerData['custconemail']);
}
// MOD END Woopra Analytics
- Replace
- /includes/classes/class.facebooklikebutton.php
- /templates/__master/Snippets/FacebookLikeButton.html
- Add
- /modules/analytics/woopra (and contents)
Functionality:
- Provides a specific Woopra analytics code module (rather than having to hard code or use the GA one)
- Auto tags Woopra visitors with their name, email and orderID when they complete an order
- Auto tags Woopra visitors with their name when they are logged in [New Ver: 1.0.1]
- Uses the facebook XFBML code instead of the iFrame version
- Fires tracking event when the facebook "like" button is clicked
- Only loads the FB code nugget if the FB functionality is enabled
Support for this module will be provided upon proof of a donation to a charity so you're on your own. That said, I am considering developing this further as a paid module in the future depending on a few other integrations I'm considering.