Title: Conversion based on URL with specific parameter
Last modified: May 5, 2018

---

# Conversion based on URL with specific parameter

 *  [lsilver](https://wordpress.org/support/users/lsilver/)
 * (@lsilver)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/conversion-based-on-url-with-specific-parameter/)
 * We use the same thank you page for multiple ebook offers. I’m trying to figure
   out a way of triggering a specific lead conversion that can also identify the
   ebook the conversion is based on.
 * I could send to the thank you page the ebook name in a URL parameter but I can’t
   figure out how to fire the lead conversion with the URL parameter. It just doesn’t
   seem to work.
 * Is there any other way? Maybe dynamically populate the Content Name field with
   the title of the referring page?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Antonino Scarfì](https://wordpress.org/support/users/antoscarface/)
 * (@antoscarface)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/conversion-based-on-url-with-specific-parameter/#post-10258425)
 * Hi,
 * sorry for the delay on my response.
 * Unfortunately, there isn’t any easy way to do that, but there is a placeholder
   definition by code you can use then inside each parameter.
 * To do that, add this code snippet at the end of the file `functions.php` of your
   active theme or in a new single file plugin:
 *     ```
       add_filter('aepc_event_placeholders', function($placeholders, $event, $event_params){
       	return array_merge($placeholders, [
       		'title' => get_the_title()
       	]);
       });
       ```
   
 * In this example, I get the title of current page and I assign it to the placeholder`
   title`, so you can use the placeholder `{{title}}` as value of the parameter 
   of an event you create inside Conversions/Events page.
 * In this way, you could define the dynamic value that will be assigned in the 
   position where you set the placeholder as value.
 * I hope is everything clear and it can help you! 🙂
 *  Thread Starter [lsilver](https://wordpress.org/support/users/lsilver/)
 * (@lsilver)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/conversion-based-on-url-with-specific-parameter/#post-10259944)
 * Thanks for the response.
 * I think that’s just going to get the title of the page where the form is submitted
   though, right?
 * And what I need is the title (or URL) of the referring page.
 * So they optin on a landing page, get sent to a thank you page we use for multiple
   landing pages, and the conversion event on that page populates with the name/
   url of the landing page where the person was coming from.
 * Now, I can include some type of identifier as a URL parameter on the thank you
   page. So is there a way of grabbing the URL of that thank you page including 
   the URL parameters? That could be an easy way.
 *  Plugin Author [Antonino Scarfì](https://wordpress.org/support/users/antoscarface/)
 * (@antoscarface)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/conversion-based-on-url-with-specific-parameter/#post-10272999)
 * Hi,
 * ok, so if you want to try the referrer URL (we cannot know the title page, unfortunately),
   you can (I just highlight the part where get the value, the rest is always as
   before):
 *     ```
       ...
           'referer' => $_SERVER['HTTP_REFERER'] ?? null
       ...
       ```
   
 * you just need to check that the URL is getting properly, by checking via Pixel
   Helper.
 * Or, you can get the parameter from URL as you mentioned, in this way:
 *     ```
       ...
           'parameter' => $_GET['parameter'] ?? null
       ...
       ```
   
 * That’s it.
 * You can change the key (`referer`, `parameter`, so on) as you want, just leave
   the quotes as I wrote.
 * I hope it can help you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Conversion based on URL with specific parameter’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/pixel-caffeine_e2ce0c.svg)
 * [Pixel Caffeine](https://wordpress.org/plugins/pixel-caffeine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pixel-caffeine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pixel-caffeine/)
 * [Active Topics](https://wordpress.org/support/plugin/pixel-caffeine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pixel-caffeine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pixel-caffeine/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Antonino Scarfì](https://wordpress.org/support/users/antoscarface/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/conversion-based-on-url-with-specific-parameter/#post-10272999)
 * Status: not resolved