Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have several landing pages with subscription button, and there is already PHP code on them to show me the landing page and source of the subscriber on the backend of Joomla. I am creating a new landing page and would like to update the code so that I can see that the subscribers would come from this page. Here's the code:

<?php
  if (empty($_GET['lang'])
      || !in_array($_GET['lang'],array('de','en'))) {

    $_GET['lang'] = 'en';    
  }
  $language = $_GET['lang'];

  $text = array(

               );

  $redirect = '/see-properties?utm_source=Other&utm_medium=CPC&utm_content=LP1-o&utm_campaign=LP1-o';
  $lists = '1,45';
  $website = 'http://www.rubinarealestate.com/?utm_source=Google&utm_medium=CPC&utm_content=LP1-source&utm_campaign=LP1-source';

  if (strpos($_SERVER['REQUEST_URI'], '/linkedin/') !== false) {
    $redirect = '/see-properties?utm_source=Linkedin&utm_medium=CPC&utm_content=LP1&utm_campaign=LP1';
    $lists .= ',11';
    $website = 'http://www.rubinarealestate.com/?utm_source=Linkedin&utm_medium=CPC&utm_content=LP1-lkdin&utm_campaign=LP1-lkdin';
  }
  else if (strpos($_SERVER['REQUEST_URI'], '/adwords/') !== false) {
    $redirect = '/see-properties?utm_source=Adwords&utm_medium=CPC&utm_content=LP1-google&utm_campaign=LP1-google';
    $lists .= ',12';
    $website = 'http://www.rubinarealestate.com/?utm_source=Google&utm_medium=CPC&utm_content=LP1-google&utm_campaign=LP1-google';
  }
  else if (strpos($_SERVER['REQUEST_URI'], '/social/') !== false) {
    $lists .= ',11';
  }
?>

Any help is appreciated! Thanks!

share|improve this question
Rather than editing the template files you should just create an invisible module on using the php with variables, your making it harder than it need be. – bybe Feb 16 at 11:22
Bybe, I was sure there has to be an easier way to do this. I actually figured out how to see that they are coming from this page by the lists ids (1,45). Do you know any resources on how to learn more about this? Thanks! – Valeriu Feb 17 at 12:39
Well most anaylics such as Google which will do this without editing code, have you considered JavaScript Analyics based monitoring? – bybe Feb 17 at 13:15

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.