WooCommerce is a free plug-in for the content management system WordPress, which adds the functionality of an online shop to WordPress. One of the most popular WordPress plug-ins was first released in 2011.
With the free plugin the feed can be generated:
To the plugin Product Feed PRO
Our technical shop support will be happy to assist you with the setup if required.
Integration of conversion tracking:
i. In the admin area, navigate to "Design -> Theme editor" (in newer versions "Tools > Theme file editor"). Then select "Theme functions (functions.php)" on the right. If the file does not exist, either a child theme must be created (How to set up and use a child theme) or a functions.php must be created in the root directory of your theme (wp-content/themes/THEME/).
ii. Copy in this code snippet:
/** solute Landingpage Tracking */
add_action ('woocommerce_single_product_summary', 'landingpageTracking');
function landingpageTracking(){
if (strpos($_SERVER['REQUEST_URI'], "soluteclid") != '' and strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "bot") == ''){
if ( ! WC()->session->has_session() ) {
WC()->session->set_customer_session_cookie( true );
}
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'){
$landing = 'https://';
} else {
$landing = 'http://';
}
$landing .= $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
WC()->session->set('soluteclid', time()." ".$landing);
$url = "https://cmodul.solutenetwork.com/landing";
$url .= "?url=".urlencode($landing);
$curlCon = curl_init();
curl_setopt($curlCon, CURLOPT_URL, $url);
curl_setopt($curlCon, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlCon, CURLOPT_USERAGENT, "Billiger.de-Code (WooCommerce ".WC_VERSION.")");
curl_exec($curlCon);
curl_close($curlCon);
}
}
/** solute Conversion Tracking */
add_action ('woocommerce_thankyou', 'conversionTracking');
function conversionTracking($order_id) {
$order = new WC_Order($order_id);
$total = $order->get_total();
$shipping = $order->get_shipping_total();
$tax = $order->get_total_tax();
$sale_amt = $total-$shipping-$tax;
if (WC()->session->get( 'soluteclid' ) !== null){
$ttl = 60*60*24*30;
$session = WC()->session->get( 'soluteclid' );
$soluteclid = explode(" ", $session);
if ((int)$soluteclid[0] + $ttl > time()){
$url = 'https://cmodul.solutenetwork.com/conversion';
$url .= '?val='.urlencode($sale_amt);
$url .= '&oid='.hash('md5',$order_id);
$url .= '&factor=1';
$url .= '&url='.urlencode($soluteclid[1]);
$curlCon = curl_init();
curl_setopt($curlCon, CURLOPT_URL, $url);
curl_setopt($curlCon, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlCon, CURLOPT_USERAGENT, "Billiger.de-Code (WooCommerce ".WC_VERSION.")");
curl_exec($curlCon);
curl_close($curlCon);
}
}
}
Attention: The functions.php will be overwritten every time a new Wordpress theme is selected.
Our Technical Shop Support will be happy to help you.
Tel: +49 721-98993-60
(For direct dialling, select "1" in the voice menu and then "2".)