I am working on a WordPress Site. I just want to add a button on a page and track its behavior.
My main question is when I create a campaign URL, I just want to change button behavior according to the URL parameter.
For example:
Imagine, I have a URL such as http://mylocalsite.com/campaign-page/?campaign=linkedin . I just want to show a button that goes to the LinkedIn url.
On the other hand, imagine, I have a http://mylocalsite.com/campaign-page/?campaign=facebook and then I want to show the same or different button that goes to Facebook URL.
Is there any way to do that? I can create campaign URLs with some marketing plugins, but I could not find a plugin that makes button smart according to URL.
Thanks in advance for suggestions
if else
statement in PHP will do it..if ($_GET['campaign'] == 'linkedin') { echo '<a href="#">LinkedIn</a>'; } elseif ($_GET['campaign'] == 'facebook') { echo '<a href="#">Facebook</a>'; }