vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - Rewrite eBay Links (https://vborg.vbsupport.ru/showthread.php?t=144214)

ETDC 04-20-2008 05:05 AM

Ok, a few days have passed and the code is confirmed as working.

However, as previously stated all URLs resolve to eBay US (even if it's a .co.uk or .de link. Therefore, only clicks (and subsequent purchases) by those in the US are registering and generating commission on the eBay partner Program.

Is there any way at all that the code can be modified to resolve to the clicker's default eBay location and thus generate commission?

This isn't a whinge; this is a superb mod but it could be so much better if the above was possible. :)

_

sinucello 04-20-2008 10:04 AM

Hi,
Quote:

Originally Posted by ETDC (Post 1494920)
However, as previously stated all URLs resolve to eBay US (even if it's a .co.uk or .de link. Therefore, only clicks (and subsequent purchases) by those in the US are registering and generating commission on the eBay partner Program.

I don`t have a solution for a dynamic - location aware - rewrite but here`s my changed code for the german program (warning, this has my affiliate ID hardcoded, please replace it with the config-var!):
PHP Code:

function rewrite_ebay($text '')
{
    if (!
$text)
    {
        return 
$text;
    }

    global 
$vbulletin;

    
$search $replace = array();
    
$anchor preg_quote('<a href="');

    if (
preg_match_all('/' $anchor '([^"]+)/i'$text$links))
    {
        if (!
$links)
        {
            return 
$text;
        }

        
$links array_unique($links[1]);
        
$parsed array_map('parse_url'array_map('strtolower'$links));

        foreach (
$parsed AS $key => $parsie)
        {
            if (!
$parsie['host'] OR !preg_match('/(.*)ebay\.[a-z0-9]+/i'$parsie['host']) OR preg_match('/partners\.webmasterplan\.com/i'$parsie['host']))
            {
                unset(
$links[$key]);
                continue;
            }
        }

        if (!
$links)
        {
            return 
$text;
        }

        foreach (
$links AS $url)
        {
            
$newurl 'http://partners.webmasterplan.com/click.asp?ref=372170&site=1382&type=text&tnb=23&diurl=' rawurlencode(str_replace('&amp;''&'$url));
            
$search[] = '<a href="' $url;
            
$replace[] = '<a href="' $newurl;
        }
    }

    if (
$search)
    {
        
$text str_replace($search$replace$text);
    }

    return 
$text;


Ciao,
Sacha

ETDC 04-20-2008 01:24 PM

Thanks.

Dismounted; do you think it's possible? It's important enough that I'm willing to consider making it a paid job...

Dismounted 04-21-2008 06:08 AM

As I see it, sinucello's URL is using a completely different affiliate program.

ETDC 04-21-2008 02:21 PM

^ Ok, I'm assuming a multi-national code isn't possible. Even a paid job?

What about one which will recognise the original URL typed in the forum? Therefore ebay.co.uk would register as a UK click/sale, ebay.fr French, ebay.de German etc etc.

Possible? :)

Dismounted 04-22-2008 07:33 AM

But what about the prefix? ;)

Also, EPN also says that it will automatically handle localisation.

ETDC 04-22-2008 05:31 PM

Nope. :(

From eBay:

Quote:

Thank you for contacting us regarding your question on what you could do so that clicks by users from other countries would register clicks and revenue.

I would like to inform you that program-specific links only track actions for the corresponding site (i.e., eBay US links track actions on eBay.com).

If affiliates have visitors from different countries, consider using our Geotargeted links or creatives, which will automatically track for relevant programs.

I hope this information answers your question. Thank you for using eBay.

Kind regards,

eBay Partner Network Support
Geotargetted links won't work in my case because people just cut and paste the URL from ebay (and it's usually either US or UK links they post).

I accept though that geo-targetted URL conversions may be impossible but it must be possible to recognise what people have typed (or cut n' pasted) on the forum, no?

:)

oldengine 04-23-2008 01:24 AM

Unintalled

oldford 04-23-2008 11:26 PM

A couple of days ago eBay came out in their blog saying that the URL's in their links needed to be encoded. Previously their own affiliate link creator was not doing this. (it appears to be fixed and is encoding now)

Does this mod do this currently? I'm just wondering if we're basing everything on how eBay was previously telling us to do it, which has now changed.

My sales and commissions went down about 75% when I switched to the new eBay system, so for now I've switch back to CJ, at least until the end of the month.

Here's a quote from eBay and a link to the blog:
http://www.ebaypartnernetworkblog.com/category/english/

Quote:

2. Make sure you ‘url encode’ the eBay destination url (after mpre= ) and if you are using the customid and you have any special characters within it, this will need to be url encoded too.

ETDC 04-23-2008 11:49 PM

It's working fine here for me.


All times are GMT. The time now is 08:58 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01550 seconds
  • Memory Usage 1,758KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete