Hi Everyone,

I'm new to this forum. I hope to learn a lot here. My first question is this, in affiliate marketing, how does one use the postback url feature in order to track affiliate sales ? Meaning if someone searches "Mobile Phones" & goes to my site and they purchase a mobile phone through one of my urls, how would I be able to track that sale ?

My affiliate marketing firm that I promote various offers for has this feature but I don't know how to use it.

They ask me to enter my

"Enter Your Non Site Specific Postback URL"

then

Enter Your Postback URL for Site

they also ask for affiliate id, site id, offer id, subid, & unique conversion ? How does all of this tie into postback urls ?

Thanks for everyones time

PostBack Urls just send information to a certain page. So basically what they are asking for is your first, non site specific postback url, which they will use to send a command to that page, where on that page you are responsible for transfering the data to a source of your own (database, xml, text, whatever). Then your site postbackurl just sends them directly back to your site to the page you specified.

What you can do if you plan on doing this yourself is to create a SUB that when a user clicks the URL on your site that leads to an affiliate, it will call the sub, then transfer to the url. Or you can set it to post to a certain page that will automatically send to the affiliate site. An example of this is creating a page that creates the hyperlink with the information needed on the next page.

<a href="/transfer.aspx?id=12124&productid=1252">Purchase a Chocolate Phone</a>

Then on the transfer.aspx page, you can look up the information in a database that you need to transfer the page to the affiliate site. But before transfering, you need to insert a record that shows someone clicked the link and at what time for what affiliate for what product. Then after that send to the new page. I would also create a backup that if for some reason the access to the database failed or the insert failed, log it into a text file to manually add it later if needed.

Understand?

Hi Everyone,

I'm new to this forum. I hope to learn a lot here. My first question is this, in affiliate marketing, how does one use the postback url feature in order to track affiliate sales ? Meaning if someone searches "Mobile Phones" & goes to my site and they purchase a mobile phone through one of my urls, how would I be able to track that sale ?

My affiliate marketing firm that I promote various offers for has this feature but I don't know how to use it.

They ask me to enter my

"Enter Your Non Site Specific Postback URL"

then

Enter Your Postback URL for Site

they also ask for affiliate id, site id, offer id, subid, & unique conversion ? How does all of this tie into postback urls ?

Thanks for everyones time

I created a link tracking application as part of a user tracking system just a month or so ago. What I used was an asmx request handler - when the links are created I added a javascript call to the handler with the user and link's information. The handler just gets the call and stores the information. A regular page can also do the trick. I called the page\handler using HTTP JS request...so the user does not need to wait for the call to complete (using async call of course).

Hi SheSaidImaPregy & Shaulf,

Thanks for both of your replys. Sheesaidimaprgy, I understand what your saying as a whole but where I'm getting confused is when you say

Or you can set it to post to a certain page that will automatically send to the affiliate site. An example of this is creating a page that creates the hyperlink with the information needed on the next page.

In order to do this correctly I need to place the "product id" & "id" to track the affiliate offer but when someone clicks on that link the information (and this is where I'm getting confused) is sent back to the transfer.aspx page ? If that is accurate, how is that actually done ? How is it possible to track if "John Doe" buys something on a site that I have no control over ?

shaulf, is it possible to get this code ?

Thanks again for both of your replys.

No way to do that unless that site provides the functionality for you, which I belive you said before that it does. What they are asking you for is a url that they can send a command to letting you know there was a purchase, and then a url sending the customer back to your site.

scm22ri - send me an email address I have a zip file ready...

Hi, also have a similar thread. For me a affiliate managers have to post back the url from their server, which will be posted to the URL via GET variables. I would like to know how can i create a asp.net page to receive the post back from their server. They will post back the URL automatically thru "http://www.YOURSITE.com/closedloop.php?campid=xxx&campname=xxx&commission=xxx&subid=xxx&sid=xxx&status=xxx"
but i want to create a page in asp.net, in order to store or update the data from the variable above(XXX). Also, i don't know how to do the closed loop postback URL to let only the post back from the IP XXX-XX-XX-XX. Thanks for your replies.

no way to change their postbackurl unless you ask them and they ablige. otherwise, create a dummy php page that redirects to your asp.net page with the same variables.

check for their IP, which will most likely fail, but hey.. it may work?

Dim ip As String = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if ip Is Nothing or ip = "" then
ip = Request.ServerVariables("REMOTE_ADDR")
end if

sorry for confusing you, but they also let me set the URL to let the server post back url to my site. My problem is only to create a page either asp or aspx or php to be available for the server, and let it post the variable to my database. if u have any confusion, let me know cause i really want to solve this. Thanks for ur replies...

basically what you would do is create a dummy page in PHP that forwards the whole url to your next page, which is in asp.net. Then there, on page_init as you don't need anything at load time, you can put the information into strings and store it ina database.

Sub Page_Init(ByVal S As Object, ByVal E As EventArgs)
Dim conString As New SqlConnection( connectionstringshere )
Dim cmdInsert As New SqlCommand( "INSERT INTO Marketing VALUES (@campid, @campname, @commission, @subid, @sid, @status)", conString )
cmdInsert.Parameters.AddWithValue( "@campid", (Trim(Request.QueryString("campid"))) )
cmdInsert.Parameters.AddWithValue( "@campname", (Trim(Request.QueryString("campname"))) )
cmdInsert.Parameters.AddWithValue( "@commission", (Trim(Request.QueryString("commission"))) )
cmdInsert.Parameters.AddWithValue( "@subid", (Trim(Request.QueryString("subid"))) )
cmdInsert.Parameters.AddWithValue( "@sid", (Trim(Request.QueryString("sid"))) )
cmdInsert.Parameters.AddWithValue( "@status", (Trim(Request.QueryString("status"))) )
conString.Open()
Dim intRows As Integer = cmdInsert.ExecuteNonQuery()
conString.Close()

if intRows < 1 then
  'write your info to a file if no rows where inserted.
  'this would be very smart to keep track incase of database failure.
  'would also be smart to just do it and keep it as a backup.
end if
End Sub

but can you give the code to foward in php? and is this available for ms SQL server? and how to include the ip filter. Thanks you so much for ur answers...

do what I listed above. First step records the user's ip directly, if that is unavailable, it grabs the networks IP (problems for those who use routers, but I doubt this would matter for you).

THen use the example to store it in a database.

Anything confusing to you, let me know

can i just use the protected directory and let only the IP to access?

yes, but why even do this? You should be able to just do a simple check on whether or not someone has redirected to your site, through let's say.. Request.ServerVariables("HTTP_REFERER")

It will come up null if someone typed in the url.. only one problem. If they open up a new folder on their desktop, and type in the url verbatum, they will be able to bypass your little attempt. Then you should just check to see if it is the right IP.

Make sure that they have a dedicated IP. It would be up to you, do it any way you wish.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.