Getting Started

Define a Project

You can use Omniture Studio to implement your Omniture solution once you have defined a structure. Omniture recommends that you build a Solution Design Document (SDD) that defines your metric structure. This includes your props, evars, and events. From this document, you can create a custom library for you specific site.

newproject.jpg

First create a project and setup the project level properties. Define a project name, library folder, scode file path, etc. These will be used in the generation to customize you library.

evarscreen.jpg

Next you begin to setup your evars, props, and events. The next three screens are very similar, one for each type. You can define these objects and give each an alias. When your library is generated it will use the alias as the object name. This allows you to have strongly-named objects instead of using the default names like evar1, evar2, etc. All objects types support aliases.

You can enter each item separately of course or use the paste button to paste multiple items at once in a tab delimited format.

Finally you can define your site pages. Use the import feature to import all files from a C# web project or a .NET website. You do not need to define any pages; however doing so allow you to setup the Omniture page names and channels at design time. These will be compiled into an XML file used by the library to define static information like that as well as static evars, props, and events.

Notice that each page has its own set of evars, props, and events. Any items associated with a page in the designer will be the default at runtime. You can of course define any of these at runtime, but if you have objects that should always appear on a page it is better to define them in the designer.

pagescreen.jpg

The defined pages are used in conjunction with the global setting “Allow error on page not found”. When this property is checked, pages not defined in your project will raise an exception at runtime. You can uncheck this property to allow any page name. Pages not defined in this scenario have no page or channel name at runtime.

Build and Use Library

Once you define your project, press the build button to create a custom library. This action takes the project settings and definitions and generates a .NET library based on it. Include this library in your web project and add a few line of code to your page.

page_snippet.jpg

The following code creates the web control and sites it on the page. The page Render method is overridden rename forms that you have defined in your project. This is required for some Omniture plug-ins. If you do not need to override form names then this step if not necessary. If you define this on a base page it is a nice convenience to add a property for the web control. This allows user to address it as an object on every page as in the following code.

button_snippet.jpg

To use the control simply call its properties in code. The following example sets the recruiter email and company props and calls the email employer event. Notice that the evars, props, and events are strongly-named.

You must add a line to the “web.config” file of your application as well. This informs the custom generated DLL of where your XML configuration file is located. In the AppSettings section, add a node with the key “OmnitureSiteConfiguration” and the absolute path to the generated XML file for the specified Omniture Studio project.

Performance

When the page is rendered to the clients, all necessary Omniture code is generated into it. This also works across pages. For example, if you capture the click event of a button and set some variables then redirect to another page, the Omniture code will be displayed on the next page. In fact, it will be displayed on what ever page is rendered to the client next. After a page is rendered to the client browser, all settings are rest. This ensures that the settings are never rendered twice and thus double counted. This functionality is also nice in that code can redirect a page an indefinite number of times without loosing your metrics. Always the final client render contains your tracking settings.

Last edited Sep 13, 2009 at 3:02 AM by codetools, version 6

Comments

No comments yet.