Questions created by drewhammond
-
Passing Google Analytics Variables Through Javascript?
Alright so here's my situation and hopefully someone can help... I want to be able to pass Google Analytics variables onto my affiliate links so I have some better conversion tracking data (not PPC traffic so no easy dynamic keyword insertion variables). I want to do something like this: User searches "keyword" in Google > User lands on mysite.com > search data is assigned to global variables that I can use in my affiliate link redirect script. afflink.com/?id=123&keyword=[GA keyword variable] Anybody know how I would go about doing that? I've seen other Non-GA tracking scripts do this but I can't figure it out here and it's driving me crazy! Thanks,
Affiliate Marketing | | drewhammond
Drew EDIT: Just figured it out after a lot of guess and testing... I'm not sure if the way I'm doing it is the fastest, most optimized way but it works. Solution: I can pull the GA cookie and break it down to retrieve the keyword using PHP. For anyone searching for this in the future, here's how I did it: $gacookie = $_COOKIE['__utmz'];
$keyword = substr(strstr($gacookie, 'utmctr='),7); ?> Then I can use the $keyword variable wherever I need it. I haven't actually tested this on a live site yet but everything is working fine as of right now. If anyone has a better solution please feel free to answer.0 -
Wordpress Pages vs. Posts
When building a blog to promote a particular affiliate offer, I usually like to use a static "page" homepage and then have my posts displayed on another part of my site. I've noticed that my wordpress pages almost always rank higher than wordpress posts and I can't explain it... Here are some possibilities I've thought of: XML Sitemap priority is set at 60% for pages and only 20% for posts My main navbar lists the pages which consequently means they get linked to on every page on my website. Some other phenomenon within the wordpress framework... If it helps, I use Thesis v1.8 on all my sites. I guess my ultimate question is: If pages do in fact rank higher than posts, is it worth it for me to go back and change the site structure on all my blogs which are using posts instead of pages. I know making major modifications like that can be disasterous but will it ultimately pay off? Thanks
On-Page Optimization | | drewhammond1