Hi all,
I am trying to configure the Omniture Integration module in a Drupal 7 site. According to what I could gather by now, unlike in Drupal 5 here instead of the .inc file we define the variables with the hook_omniture_variables(). I couldn't find any documentation for this other than the sample code given in the omniture_basic.module file included with the module. But even after referring the code, I am unable to set and pass the various required variables like sitename, pagename, etc to Omniture reporting.
Can anybody please guide me with any information they have regarding using Omniture integration module for Drupal 7?
Thanks in advance!
Comments
Comment #1
bleen CreditAttribution: bleen commentedThere is a patch in the issue queue that would allow you to add custom variables right in the GUI. It would be terrific if you could give it a try and report back your results: #1791670: Allow sites to include variables (with token replacement) from the Omniture settings form
That said, hook_omniture_variables() simply needs to return an array in the following form:
But it would be really awesome if you could try the patch in that issue above first.
Comment #2
neethu r CreditAttribution: neethu r commentedHi bleen18,
Thanks a lot for your response. I'll try this and get back soon. Also meanwhile can you please, help me understand this code in omniture_basic.module:
if ($variable_name = variable_get('omniture_var_pagename', FALSE)) {
$variables[$variable_name] = strip_tags(drupal_get_title());
}
if ($variable_name = variable_get('omniture_var_username', FALSE)) {
global $user;
$variables[$variable_name] = format_username($user);
}
Can you please tell me what this implements and also the variables in bold italic shown above, are they the defaults for Drupal 7?
Thanks
Comment #3
bleen CreditAttribution: bleen commentedThe variables you highlighted in #2 will always be set to the values that you (or some user with privileges) have entered into the those fields that were added to the omniture settings form in the omniture_basic_form_omniture_admin_settings_alter() function. Does that make sense?
As for the larger question of what the whle chunk of code is doing there, it is adding the current page name and/or the current username to the $variables array that will be returned by the omniture_basic_omniture_variables function. This way, the following will be included on your pages:
s.prop5 = "Current page title";
s.prop6 = "Username of current user";
(assuming you entered "s.prop5" and "s.prop6" in the omniture settings form)
Hope that helps
Comment #4
pashasc CreditAttribution: pashasc commentedHow does one track onclick s events for tracking button / link clicks.
I assume inside a drupal.behaviors call like so, http://stackoverflow.com/questions/9418461/omniture-sitecatlyst-tracking...
But do I need to also return those variables in hook_omniture_variables()
Comment #5
bleen CreditAttribution: bleen commented@pashasc ... I dont believe you need to add anything via hook_omniture_variables to handle event tracking
Comment #6
neethu r CreditAttribution: neethu r commentedHi bleen18,
That explanation is really helpful. Thanks a lot. Would work on it and let you know.
Comment #7
bleen CreditAttribution: bleen commentedmarking support request as fixed