eBay PN-Link-Generator using eBay API
Asked Answered
S

1

5

I just started using the eBay API, but couldn't find a way to accomplish my needs. Also this should be really simple normally.

I want to know if it is possible to pass just any eBay URL to the API (PHP) and get a new link with my affiliate-parameters added.

It should just work the same way like the Link Generator in the Partner-Network-Section on eBay.

For example:

www.ebay.de/some-ebay-url/

Should be turned into something like:

http://rover.ebay.com/rover/x/xxx-xxxxx-xxxxx-x/x?xxx=4&pub=[my_publisher_id]&toolid=10001&campid=[my_campaign_id]&customid=&mpre=http%3A%2F%2Fwww.ebay.de%2Fsome-ebay-url

Or is there a easy way to just add my Affiliate id to an ordinary link?

Thanks

Shondrashone answered 21/10, 2014 at 13:4 Comment(3)
This seems like a case of "I don't want to read the docs, or experiment myself", right?Roldan
Oh i didnt recognize that trolls exist here ... Maybe it is just a case of i really couldn't find it ... and dont have time to spent hours n hours in experimenting if it is not 100% needed... I dont want anyone to do my work... But if somebody has a quick answer on a simple question... Would be super... Thats what this is for right? Share knowledge, or did i get something wrong?Shondrashone
You are expected to demonstrate that you've already researched the issue and show your code, so the comment by @ʰᵈˑ does not seem out of line; and with over 4000 rep, he's hardly a troll. However, IMO, the tone of your response is a little too defensive and sarcastic for SO. Please review: stackoverflow.com/help/how-to-ask ~ Thanks.Toolis
I
13

There isn't an API call at eBay to do what you want, in part because you can do it yourself pretty easily. You kinda already did it yourself with your example - yes, it's that easy.

You basically use the Link Generator just once (or a few times, to get acquainted with things) to obtain the template of a rover link and select the Custom URL option, then you use that format with any eBay URL you like, making any required tweaks. Take the eBay URL you want, URL encode it, then insert it as the &mpre= parameter at the end of the affiliate/rover link. That's the gist of it.

Know that &pub= is optional and doesn't affect the tracking of your link. &campid= is the necessary tracking parameter.

The long numerals in the front of the rover link (Rotation/Placement ID) define what ePN program to attribute tracking to. You might need to parse your input URL to determine the eBay domain (eBay.com? eBay.de?) to decide which Rotation/Placement ID to use, although they may/should work for cross-site tracking if you desire.

I've documented all the Rotation IDs here on my site. Click the page title up top for the main site with more eBay technical info I've discovered over the years.

Inhambane answered 26/10, 2014 at 18:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.