Need help with php tracking across several pages

2 replies
I need help adding php tracking from Adwords to index.php to page 1 to page 2 to page 3.

I want to generate an outbound affiliate link with keyword tracked from Adwords to the affiliate program "subid=". The outbound link is generated in an iframe, which what may be causing my problem.

Here is what is being generated in the page source:

<iframe src="http://affiliateprogram.com/&subid1=<?php echo $_GET['kw'] ;?>" frameborder="0"></iframe>

For some reason my <?php echo $_GET['kw'] ;?> isn't converting to kw which is my keyword that is being tracked.

Here is the code from the php file that generates the above link:

<iframe src="<? echo "$url"; ?>" frameborder="0"></iframe>

The $url is generated at the top of the page as: $url=$row["url"];

I don't know a lot of php but I've tried session tracking and everything else I can find on the net, but I might not have been doing it right.

Here is what is currently on my landing page (index.php)

session_start();
if(isset($_GET['kw']))
$_SESSION['tracking'] = $_GET['kw'];

I don't know if I've provided enough information, but does anyone know how to solve my problem?

I've also tried adding the kw to the $url=$row["url"], but probably wrong. I tried something like:

$url=$row["url" + "<?php echo $_GET['kw'] ;?>"]

but it generated errors on page load.

Anyone have any ideas?

Thanks,

Dennis
#pages #php #tracking
  • Profile picture of the author RedMatrix
    dnsg, have you found a solution yet?

    I work with php, and bill at $10 an hour. I would be happy to take a look at your project and give you an estimate. PM me.
    Signature

    ~Dave

    {{ DiscussionBoard.errors[744752].message }}
  • Profile picture of the author Jeremiaho
    Not completely sure what you are trying to do, but would replacing the following line...

    $url=$row["url" + "<?php echo $_GET['kw'] ;?>"]

    with...

    $url=$row["url"] . '/?subid1=' . $_GET['kw'];

    help?
    {{ DiscussionBoard.errors[754534].message }}

Trending Topics