ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Tracking ROI With EE

February 06, 2009 10:02am

Subscribe [3]
  • #1 / Feb 06, 2009 10:02am

    Jay Logan

    140 posts

    Hello. I’m trying to determine what would be the best solution to track leads that come from our Google AdWords campaigns. I want to assign a unique URL (possibly add an extra segment in the URI) and if a form is submitted from a page containing that segment, then my form submission would store a hidden field to be posted to the database. Has anyone done anything like this? The problem I run into is when a user visits multiple pages then decides to come back to the form. Thanks.

  • #2 / Feb 06, 2009 12:28pm

    lebisol

    2234 posts

    check our the freefrom or purely with php
    <input type=‘hidden’ name=‘referrer’ value=’<?php print $_SERVER[‘HTTP_REFERER’]?>’>

    but would not Google analytic be easier for catching ‘referring sites’ than making this?

  • #3 / Feb 06, 2009 2:35pm

    Jay Logan

    140 posts

    I don’t necessarily need the referring site. I need to pass an ID in the URI that will stay in the URI no mater what page they click to.

  • #4 / Feb 06, 2009 4:34pm

    lebisol

    2234 posts

    hmm…without PHP…afaik EE users either templates or segments to construct URLs but I am not sure if this is enough.
    How many IDs are we talking and will they change?

    Few things I can thinks of:
    1. template/segment approach:

    one possible way would be having http://site.com/index.php/template_id_x/view/something/
    and then you can grab the {segment_1} which essentially =“tempalte_id_x” and you could stick it into a hidden field.

    2. global variable approach:

    Other option (perhaps better so you don’t have to have IDs in URLs at all) would be to declare global variable and then call them depending on which page they are.
    code logic:
    {if my_default_template or segment_1 ='news'}
    ...use {global_var_1} in hidden form field
    {/if}

    3. storing IDs into custom weblog fields:
    and perhaps using related entries (these entries could be nothing more than single weblog with singe field called google_id)
    {If on entry x use its related field for value of hidden form field}

    Again, depends how many IDs will you have and how often will they change…how dynamic all this needs to be.

  • #5 / Feb 06, 2009 6:55pm

    James Smith

    259 posts

    You should really go for a cookie approach for this, though that would involve some php or javascript. If you’re using Google Analytics and Adwords together you can tie the accounts together and it should just do it all for you without having to involve EE.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases