Tracking Code for cj.com (on WooCommerce checkout)
CJ Affiliate (previously Commision Junction) is an affiliate service that can bring money and customers to your website. Learn more at cj.com . This plugin sends the necessary data to participate in the CJ Affiliate network. Tracks WooCommerce activity and successful Gravity Forms submission. WooCom
About this tool.
CJ Affiliate (previously Commision Junction) is an affiliate service that can bring money and customers to your website. Learn more at cj.com .
This plugin sends the necessary data to participate in the CJ Affiliate network. Tracks WooCommerce activity and successful Gravity Forms submission.
WooCommerce or Gravity Forms is required, if you want the tracking code added to a different plugin, I can explain to your developer what they need to do to code this up. You may create an issue to track new integrations at the github repo .
A closer look.
Getting started.
1) Add the plugin through the ‘Plugins’ menu in WordPress
2) When prompted, activate the plugin
3) Go to Settings > CJ Tracking Code
4) Enter in your account info
5) The tracking data will then be sent for WooCommerce customers, and on successful Gravity Form submissions. Supports WooCommerce 3.0+ , and Gravity Forms 2.4+
Extending the Plugin
The following filter is available for extending the plugin
cj_settings
This filter allows you to conditionally determine what the CID, type, and tag ID should be. This is useful when you have want to use multiple tag IDs and types.
Basic Example:
add_filter('cj_settings', function($account_data, $submission_method, $order){ // make changes to $account_data here return $account_data; }, 10, 3);
Example 2:
add_filter('cj_settings', function($settings, $submission_method, $order_or_form_data, $order_or_form_id){ // make changes to the settings here // Note: return false if you don't want to send any data to CJ for this transaction return $settings; }, 10, 4);
The first parameter is an array containing all of the settings to filter. More settings may be added later, but the array currently holds:
- 01‘enterprise_id’ – the enterprise ID
- 02‘action_tracker_id’ – the action tracker id
- 03‘tag_id’ – no longer used
- 04‘cid’ – no longer used
- 05‘type’ – no longer used