Welcome to WebmasterWorld Guest from 54.90.204.233

Forum Moderators: mack

Message Too Old, No Replies

Inserting code A into blog home page but code B into all other pages

Blogger blog

     
12:21 am on Jan 10, 2008 (gmt 0)

New User

10+ Year Member

joined:Jan 31, 2006
posts: 31
votes: 0


I have a Blogger blog with my own domain name and hosting (I don't have any website building skills!). I've been asked by a potential advertiser to place tracking code A on the home page only, and tracking code B on every page except the home page.

Would it be possible to do the following:
Include some type of condition in the template such that tracking code A would be included in index.html only, and tracking code B would be included in every other page?

OR

1) include tracking code B in the blogger template
2) publish the blog to somewhere that it cannot be viewed by the public
3) modify index.html to replace tracking code B with tracking code A
4) then make the updated version of the blog available online?

Any help would be greatly appreciated!

4:19 pm on Jan 10, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 12, 2005
posts:70
votes: 0


It seems like you should be able to put some PHP around the tracking code snippet so that it looks at the current URL, and shows one or the other tracking code as appropriate... I'll let someone more familiar with PHP and blogger be more specific ;)
9:57 pm on Feb 17, 2008 (gmt 0)

New User

10+ Year Member

joined:Jan 31, 2006
posts: 31
votes: 0


This is what I ended up using (I added it to my Blogger template):

<MainPage>Code A</MainPage>

<ItemPage>Code B</ItemPage>

<ArchivePage>Code B</ArchivePage>

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members