Describing plugin BG_WP_ADMITAD to connect on-line shop based on WordPress + Woocommerce and Admitad (affiliate program) to get additional traffic to on-line store website. То же самое по-русски.
Admitad offers for on-line stores sites additional traffic with pay per completed purchase.
To create affiliate network it’s necessary to share store contents, organize monitoring attracted user’s actions on the site and record their completed purchases.
That is, it’s necessary to make changes to online shop site codes to:
- Dump products and categories to YML (Yandex Markup Language).
- Install ReTag codes on relevant pages of the online store.
- Set invisible pixel on the thanks for the order page.
All this can be done easily with the help of the plug-BG_WP_ADMITAD.
Plugin is fully compatible with WordPress Multisite.
You have to get plugin file bg_wp_admitad v version_number.zip here, contains documentation zip file and zipped folders /bg_wp_admitad, /bg_wp_retarg and /bg_ymp_dump. with plugins, readme, licence files and /languages folder with .pot files to translate messages. Russian translation is also included.
Upload and unzip the those folders to your /wp-content/plugins/ directory.
The last step is to place following code just before the line <!DOCTYPE html> or between </head> and <body> HTML tags
<?php // Check if we are called from admitad if ( function_exists ( 'get_cpamit_uid' ) ) get_cpamit_uid (); ?>
This code checks whether a user came by Admitad affiliate network link, if plugin bg_wp_admitad is installed and activated.
How to place the code
- All further actions should be performed only in a child theme, otherwise all changes will be lost during next theme update.
- Usually, line <!DOCTYPE html> and tags </head> and <body> are located in the theme file header.php that forms the headers of the pages of the site.
- If the file header.php does not exist, then make search in the theme folder and find the right file.
- Create a secure connection to the server by secure shell (ssh).
- Became Superuser
- Change to child theme folder for WordPress Multisite:
or for sigle WordPress site
- Copy the file header.php or another, which contains line <!DOCTYPE html> or “</ head>” tag, to to child theme folder only if this file does not exist there. All the dots in the line below are important.
cp -p ../theme_name/header.php .
- Open copied file using vi editor, find line <!DOCTYPE html> or the tag “</ head>” and insert after the above text. Finally, must be as fig.1.
- Close ssh connection to the server.
How to make Woocommerce and Admitad work together
Once the plugin is installed, change to the tab “Plugins” online store site (for WordPress Multisite) and one can see three new plugins. They are bg_wp_admitad, bg_wp_retarg_widget и bg_yml_dump. Activate them.
These plugins perform all necessary steps for an online store based on Woocommerce works together with a affiliate network Admitad.
- Make settings for the plugin bg_yml_dump (dump the contents of an online store in the format YM), as detailed in post “YML Dump WordPress + Woocommerce on-line shop content“.
- Place shortcode [bg-create-pixel] to the first line Thank You for Order Page, just before [woocommerce_thankyou] for Woocommerce 2.0 or to the first line Checkout page just before [woocommerce_checkout] shortcode for Woocommerce 2.2.
- Change to “Appearance“->”Widgets” and one can notice new widget BG_Retargetibg_Widget, which parses the pages and, if necessary, inserts a correct redirection codes. Widget is absolutely invisible.
- Drag this widget somewhere to the footer, it to appear on each page and fill codes, which are got from Admitad, as fig.2.
- Tht’s it. The plagin BG_WP_ADMITAD successfully installed and configured. Enjoy your life and cooperation with affiliate network Admitad.
Described plugin BG_WP_ADMITAD to connect on-line shop based on WordPress + Woocommerce and Admitad (affiliate program) to get additional traffic to on-line store website.