Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 12th, 2012, 06:30 AM
frme frme is offline
 
Join Date: Sep 2011
Posts: 11
Default More affliate id's for each network

Hello everyone,

I've recently discovered after a lot of struggle, that it's not possible with the current version of Datafeedr to have more than 1 ID per affliate partner. See /showthread.php?p=27254

Yet, that is a big problem, seeing as i'd like to keep all my products in the same place, without having to create extra shops, subdomains, and so on.

Does anyone know another way to get around this problem - or does anyone have a ETA on when this will be implemented in datafeedr?

Thanks.
  #2  
Old January 12th, 2012, 08:03 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

The only way to get around this is to write a PHP function that can parse your affiliate links and insert the appropriate affiliate ID into the links based on the merchant. I would use this: http://php.net/manual/en/function.preg-match.php

But after that is done, you will either have to write your own URL masking script or have unmasked affiliate links in your store.

Eric
  #3  
Old January 30th, 2012, 08:57 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Here's how you can use a function to use 2 different IDs for the same network.

In your views where you have a "Buy" button, use the following HTML to link to the merchant's page:

HTML Code:
<a href="<?php echo dfr_url_sub($product); ?>" title="[product.name]" target="_blank" rel="nofollow">[product.name]</a>
Add the following function to your theme's functions.php file. Be sure to make the 2 substitutions as mentioned in the 2 comments.
PHP Code:
function dfr_url_sub($product) {
    
    
// Change to match your TradeDouble UK affiliate ID
    
$tradedoubler_uk_affiliate_id '12345';
    
    
// Change to match your TradeDouble Denmark affiliate ID
    
$tradedoubler_dk_affiliate_id '67890';
    
    if (
$product->net_id == 40) {
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_uk_affiliate_id$product->url);
    } else {
        
$url $product->url;
    }
    return 
$url;

If your affiliate ID here The Factory > Your Store > Store menu > Affiliate ID's & Tracking Parameters > Tradedoubler is set to your UK ID, change it to your Denmark ID.

Now all of the URLs to the merchant's site will have the correct affiliate ID. The only downside is your affiliate URLs aren't cloaked.

Eric
  #4  
Old January 31st, 2012, 01:59 PM
frme frme is offline
 
Join Date: Sep 2011
Posts: 11
Default

Hello again Eric,

Once again thanks for the answers; it worked just fine for 2 ID's.
But what would i do in case i'd need to add more ID's for tradedoubler? (i.e. Germany, Sweden and so on). I tried adding them manually as the above, with extra lines, but it didn't seem to work.

Also - if i were to use other networks with this same setup, would i just add them to the same function too?

Thanks.
  #5  
Old January 31st, 2012, 02:41 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

These are the IDs for TradeDoubler Countries:

40 TradeDoubler UK
51 TradeDoubler Belgium
110 TradeDoubler Finland
64 TradeDoubler France
52 TradeDoubler Germany
111 TradeDoubler Ireland
66 TradeDoubler Italy
53 TradeDoubler Netherlands
65 TradeDoubler Spain
112 TradeDoubler Sweden
113 TradeDoubler Denmark

So a function like this is needed
PHP Code:
function dfr_url_sub($product) { 
    
    
// Add your affiliate IDs here
    
$tradedoubler_be_affiliate_id 'X'
    
$tradedoubler_dk_affiliate_id 'X'
    
$tradedoubler_fi_affiliate_id 'X'
    
$tradedoubler_fr_affiliate_id 'X'
    
$tradedoubler_de_affiliate_id 'X'
    
$tradedoubler_ir_affiliate_id 'X'
    
$tradedoubler_it_affiliate_id 'X'
    
$tradedoubler_nl_affiliate_id 'X'
    
$tradedoubler_es_affiliate_id 'X'
    
$tradedoubler_se_affiliate_id 'X'
    
$tradedoubler_uk_affiliate_id 'X'
     
    if (
$product->net_id == 40) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_uk_affiliate_id$product->url); 
    } elseif (
$product->net_id == 51) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_be_affiliate_id$product->url); 
    } elseif (
$product->net_id == 110) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_fi_affiliate_id$product->url); 
    } elseif (
$product->net_id == 64) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_fr_affiliate_id$product->url); 
    } elseif (
$product->net_id == 52) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_de_affiliate_id$product->url); 
    } elseif (
$product->net_id == 111) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_ir_affiliate_id$product->url); 
    } elseif (
$product->net_id == 66) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_it_affiliate_id$product->url); 
    } elseif (
$product->net_id == 53) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_nl_affiliate_id$product->url); 
    } elseif (
$product->net_id == 65) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_es_affiliate_id$product->url); 
    } elseif (
$product->net_id == 112) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_se_affiliate_id$product->url); 
    } else { 
        
$url $product->url
    } 
    return 
$url

Eric
  #6  
Old February 8th, 2012, 09:25 AM
frme frme is offline
 
Join Date: Sep 2011
Posts: 11
Default

Hello,

Thanks for the above once again.
Can you tell me where you find those Network id's (net_id)? In case i'd want to develop this further for other networks with multi-nationalities.
  #7  
Old February 8th, 2012, 09:47 AM
frme frme is offline
 
Join Date: Sep 2011
Posts: 11
Default

Never mind!

Figured out that if i hover the merchants inside the factory; the ID displays via the url. Seems to work at least.
  #8  
Old February 7th, 2013, 06:26 AM
stefan stefan is offline
 
Join Date: Feb 2008
Posts: 5,901
Default

Now it's possible to add per store a different affiliate ID for each country within the same network.

That means you can now specify in Store > Affiliate IDs & Tracking Parameters a different affiliate ID for the different Tradedoubler countries.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possibility to save "Network Filter" in Merchant & Network Discovery Tool ayorofrance Feature Requests 1 January 8th, 2011 07:39 PM
NEW Network Added: Google Affiliate Network stefan News & Announcements 1 June 8th, 2009 02:39 PM


All times are GMT -5. The time now is 01:13 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.