Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » eCommerce & Atahualpa »

[SOLVED] Need to add a affiliate conversion pixel to a specific page


  #1  
Old May 6, 2014, 05:23 AM
Erwin
 
4 posts · Oct 2011
[SOLVED] Need to add a affiliate conversion pixel to a specific page

For a site I have built, I need to add an affiliate program conversion pixel to a 'thank you' page, which is actually a normal page, added through the dashboard.

Since all pages use the index.php of Atahualpa as a template, I would need to add code in there that calls the thank you page by id and then echoes the conversion pixel in that page
The one thing I am not sure of is what code to use to make that pixel echo only on that thank you page.

The pixel code is:
HTML Code:
< ? php
echo <img src= [i]wont bore you with the actual pixel details[/i] alt="" />';
?>
Your help is greatly appreciated!

Last edited by lmilesw; May 6, 2014 at 07:14 AM.
  #2  
Old May 6, 2014, 05:39 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Why not use one of the options in the 'Add HTML/CSS Inserts' option? Just stick it on all pages
Or you could accept a new widget area and a php aware plugin to only show it on that page. That way you won't have to update it after a theme upgrade.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; May 6, 2014 at 05:41 AM.
  #3  
Old May 6, 2014, 05:59 AM
Erwin
 
4 posts · Oct 2011
Don't I feel stupid...

I stripped the:
<?php

echo '

from the pixel, and just added it in a plain text widget to the sidebar. I am using the "Display Widgets" plugin, so only showing it on the specific page is a breeze.


Many thanks for your lighting fast advice!!

Last edited by lmilesw; May 6, 2014 at 07:16 AM.
  #4  
Old May 8, 2014, 05:14 AM
Erwin
 
4 posts · Oct 2011
I was too eager I'm afraid, the pixel wont display correctly.

It seems there is no other way than to edit index.php and modify it each time after an update.

Since I prefer to be safe over being sorry, could you advise if this will work when entered in the index.php of atahualpa:

<?php if (is_page('bedankt-voor-uw-aanvraag') ): ?>

<?php

echo '<img src="https://urlhere.com/?cid=', ($cid = 'IDhere'), '&pid=otheridhere&tid=' . urlencode($order->id) . '&tam=', urlencode(!empty($order->order_total) && !empty($order->order_tax) ? $order->order_total - $order->order_tax : $order->get_formatted_order_total()) ,'&data=', urlencode(!empty($_COOKIE['TT2_' . $cid]) ? $_COOKIE['TT2_' . $cid] : null), '" width="1" height="1" border="0" alt="" />';

?>

<?php endif; ?>
  #5  
Old May 10, 2014, 06:38 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Why not use a plugin like exec-php and put that code in a text widget?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] post-specific header image w/ css insert (page-specific ones work, but not o viewdesigninc Header configuration & styling 10 Oct 1, 2012 03:43 PM
page menu buttons 1 pixel too high. --yeah--wow Page & Category Menu Bars 2 Jun 1, 2011 07:23 PM
conversion from movable type wppg New Versions, & Updating 0 Nov 21, 2010 06:19 PM
Import/Export Conversion Tool akellstar New Versions, & Updating 1 Aug 8, 2010 03:58 AM


All times are GMT -6. The time now is 04:14 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.