• Afternoon chaps,

    I have a small problem that I’m struggling to find a solution for (as it’s a little hard to explain to Google). I’m currently tagging a wordpress site (all static pages, used as a CMS) with the Omniture SiteCatalyst page tag (an analytics tool).

    What I’m trying to do is find a way to pull out the page hierachy for single pages. The Omniture page tag has variables such as prop1, prop2, prop3 etc, which should populate with details of each page.

    So for say the page:
    http://www.mysite.com/about/the-company/london-office/

    I’d like the page tag to appear as:
    s.prop1=”about”
    s.prop2=”the-company”
    s.prop3=”london-office”
    s.prop4=””
    s.prop5=””

    Are there any php tags that can display the url in chunks like this?

    Thanks,

    Daniel // Shadowise

Viewing 2 replies - 1 through 2 (of 2 total)
  • Dan Bissonnet

    (@asinglehumanbeing)

    At it’s most basic, something like this might do the trick:

    $parts = explode('/',trim($_SERVER['REQUEST_URI'],'/') );
    
    foreach($parts as $part){
    	echo "s.prop1='$part'; ";
    }

    There seems to be and old plugin for this too. I can’t vouch for it, but might be worth a try.

    Thread Starter shadowise

    (@shadowise)

    Yup, looks like exploding the URL might be the only way of doing this for now. I did have a look at the two plugins that are floating around, but neither of them seems to do the job.

    Thanks for your help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Page parents/depth/hierarchy’ is closed to new replies.