Landing Pages and Analytics

calendar Posted on August 18, 2007   comments 6 Comments

I was visiting with our marketing person earlier this week and she mentioned that she was going to be doing a few print campaigns -- and needed a way to track the hits that each campaign generated.

Doesn't seem that difficult, does it? I already have a Google Analytics account going for that site so want to be sure that I can track these things there.

At the time, I didn't see a way around having an extension tacked onto the landing page -- we're currently on a 3rd party IIS host (I'll be changing that next month) so I don't have much control of the web server. I had her create urls for the ads that look like http://mycompany.com/nextstep.htm.

Hindsight!
What I should have done was just created a nextstep directory on the site and dropped in a default page to land on, thus the url would be a somewhat cleaner http://mycompany.com/nextstep (no .htm) which would then load the index.html in that directory.

Live and learn.

Moving on
But wait, regardless of the approach, what should the landing page actually do? After brief discussion, we agreed it should simply redirect the person to our main index page. We really just want to see that someone came to us via the ad, we don't have any specific content for them (at this time...).

Keeping in mind that I don't have access to the IIS configuration, I decided I'd go with a "meta refresh" approach. My nextstep.htm looked like:

HTML:
  1.    <title>nextstep.htm</title>
  2.    <meta http-equiv="Refresh" content="0; URL=index.html">
  3. </head>
  4.    One moment please...
  5. </body>
  6. </html>

It worked, but I forgot to add my analtyics code. I added the analytics code between the <body> tags, tested a few times and it seemed to work.

However, the page hits never showed up in my analytics reports. Bummer. Not sure why -- I see the "One moment please..." message, but that javascript stuff never seems to fire. Granted, I could pull those hits out of the actual server logs, but the intent is to have this easily tracked by our marketing folks along with all the other nifty stuff from Google Analytics.

I could go with a bit of javascript instead. Maybe something like this?

HTML:
  1. <form name="complete" action="index.html" method="post" />
  2.    window.onLoad = document.complete.submit();
  3. </script>
  4. <!-- analytics code down here -->

Alas, this approach seems like it would work, however when tested it generated an HTTP 405 error. Since I can't configure IIS, the approach is no good.

Are there better ways to go about this? Am I making it too hard? I just want to capture the page hit and then shuttle 'em over to the site's home page.

tags Tags: , , , , , ,

Related Posts Possibly Related Posts

Comments

6 Responses to “Landing Pages and Analytics”

  1. Chris on August 18th, 2007 11:51 am

    Oh - I should mention that I can’t seem to use asp, php or asp.net on the current host either… no server-side fun. :-\

  2. Chris on August 20th, 2007 11:06 am

    Lol - I just realized that I have Google Analytics set up to filter out traffic from the office. Thus, my initial approach may have actually been working.

    Meanwhile, for the moment, I’m using the latter approach I listed, changing the POST to a GET…

    Still open to more elegant ideas.

  3. Light & Dark on August 20th, 2007 12:43 pm

    Chris, if I have Linux hosting and do have some control over it, is there a more elegant way to do what you’re doing in step 1? I’d like to avoid the javascript if possible.

    I’m assuming I can’t just do an .htaccess redirect as then the Analytics code on that ‘interim’ page would never get read, correct? Could I make the meta-refresh instantaneous so the visitor doesn’t get the One Moment Please message, but still register the hit with Analytics? (Yea, I know, I could just set it up that way and try it - don’t have time at the moment but will try it later - just thought you might have suggestions.)

    Thanks!

    Paul

  4. Chris on August 20th, 2007 9:02 pm

    Light - I suspect my first approach might actually work. Turns out I have analytics configured to ignore page visits from the office that I was testing from!

    But yeah, the .htaccess redirect would completely bypass the page.

    The meta refresh is client side, so odds are they’ll see something… andthey have to be on the page long enough to fire the analytics tracking script.

    I hear you groaning, that’s exactly what I’m wrestling with too!

  5. Light & Dark on August 20th, 2007 11:31 pm

    Thanks Chris - guess I’ll just have to fire it up and see how big a mess I can make out of it!

    Paul

  6. » pingback » More Landing Pages Soon » Solo Technology on August 24th, 2007 8:03 pm

Leave a Reply




Have you read the Comments section on the Disclaimer page?

About

Wandering the Internet, looking at all things bright and shiny. Playing with many, writing about some. More …

Recent Posts

Recent Comments: