Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3228738
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:43:42+00:00 2026-05-17T16:43:42+00:00

Ok I have some custom Omniture code I need to add to a Drupal

  • 0

Ok I have some custom Omniture code I need to add to a Drupal site. All is good as I have added the Javascript code to the themes template page. The code shows up on all the pages as expected but I have a couple of PHP variables that I need to print in the Javascript that are coming up blank.

<?php

    $omniture_event = "test this works as expected";

    $omniture =<<<OMNITURE
<script language="JavaScript"><!--

s.events="{$omniture_event}"
s.landing="{$omniture_landing}"

OMNITURE;

    echo $omniture;

?>

but $omniture_landing is set on the landing page only and it looks like the template page is being loaded first then the content of the page is being added. I can print the value to the screen and I see the Javascript in the footer as expected with the other PHP variable set, but when I try to set the variable on the landing page it comes up blank in the javascript.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T16:43:43+00:00Added an answer on May 17, 2026 at 4:43 pm

    You can edit your page.tpl.php template file. If the ‘Landing page’ is your front page, then you can do something a little easier and more consistent (if you end up changing the title).

    if($is_front) { 
      $omniture_landing = 'Yeah we have landed!!!'; 
    }
    

    Or by node id:

    if($node->nid == '1') { 
      $omniture_landing = 'Yeah we have landed!!!'; 
    } 
    

    Replacing 1 with whatever the node Id is of course

    Also, check to see if you have a page-front.tpl.php If so, that file, page-front.tpl.php is the template that runs on the landing page instead of page.tpl.php and you can add your code to page-front.tpl.php or remove it if you don’t need a separate template for the landing page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a project where a vendor produces some custom code for us and
I have a view that I want to add some custom drawing to. I
I have a Silverlight app with a DataGrid containing some custom columns and all
I have added some custom actions to our installer which is run on CE5
at our company we have some drupal projects that share some custom developed modules,
i need to get all the files ends with .doc and i have some
I have developed some custom DAO-like classes to meet some very specialized requirements for
I'd like to make some custom MenuHeaders in WPF so I can have (for
I have inherited a visual studio 2003 project which uses some custom build steps.
I have written a custom ErrorProvider which adds some functionality to the existing ErrorProvider

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.