This would count a page view for “Mobile Home” (gn= is the same as pageName=; mobile implementations allow you to substitute shorter parameter names), and a click-through for the “mobile_campaign” tracking code. You’ll do something very similar to implement link tracking on mobile sites, but you will instead use an anchor tag, where the href (destination URL) property is the Omniture image URL. Here’s an example, with the elements just mentioned in red:
There are a few important differences between this example and the one given above. As explained, we’re using an anchor tag rather than an image tag. There is a /REDIR/ element at a specific point in the path. There is a url= query parameter, the value of which is the destination URL for the page that we want the user to end up viewing after clicking the link. And all of the standard link tracking parameters (pe=, pev1=, and pev2) are present. Note that we’re using one of the coolest features of SiteCatalyst mobile measurement—“dynamic” variables (indicated by “=D=url”)—to set the pev1= parameter equal to the page URL. This can save tons of characters in your request URL!
You’ll want to set the link tracking parameters correctly, so here is a table showing what they represent:
|pe=||Type of user action||lnk_o for custom links/general
lnk_d for file downloads
lnk_e for exit links
|pev1=||Destination URL||Any destination URL
|pev2=||Link Friendly Name (displays in Custom Links report)||Custom Value
A few final notes:
- Make sure to put the url= parameter first in a mobile link tracking tag. This ensures that the user is correctly redirected even if the mobile device truncates the request of the request URL.
- We don’t need a random number in the link tracking request, since we aren’t concerned about the link getting cached (as we typically are when receiving an image).
- Using 5.4 in the beacon ensures that the visitor ID method order stays consistent if using /5/ for the standard page view beacons. (See the Mobile Device Reporting guide for more information on this.)
- The pev2= parameter isn’t strictly necessary. It may be omitted in these requests; the pev1= value (the link URL) will display in reports instead.
- Using first-party cookies is strongly recommended for mobile implementations and will make the link URLs much friendlier; I used them in the examples above (“metrics.yoursite.com”). If you are not using first-party cookies, simply replace “metrics.yoursite.com” in the examples above with “[your namespace].[112 or 122].2o7.net.”
There you have it. Make sure you refer back to my post on link tracking if you have any questions about the concept or value of what I’ve described here. One final tip: As you may have noticed in the examples in this post, I URL encoded everything (e.g., %20 instead of a space). Make sure to do this when implementing mobile web measurement in SiteCatalyst; it will ensure that your data looks exactly the way you want it to look!