Search the Omeda Knowledge Base

Olytics – Product Outline

olytics 3.0

Omeda offers a web analytic service called olytics that allows you to track both known customer visits as well as anonymous visits across your website and subscription pages. We’ve recently made some changes to the library to streamline our olytics and integrations offerings. By adding a small piece of JavaScript and defining a behavioral taxonomy by either tagging your site at the page level or by utilizing existing/new HTML meta tags you not only track your visitors across your site(s) but also gather important information about the visitors such as device and location. This behavioral data will feed back to Omeda and be stored in your v11 database which will allow you to use OnQCustomer ViewOmail and our olytics reporting suite to more accurately segment and market to your customer base.

Migrating from olytics 2.0 to olytics 3.0

Omeda will provide you with the new olytics 3.0 import script. The previous version of olytics will continue to be supported for the short term as we transition to the new library.

It is important to notice that with olytics 3.0 we no longer use any of the following:

  • analytics.track() function
  • analytics.identify() function
  • ajs_uid= parameter (will still be appended to Omail links as part of legacy support – but are not used by the olytics 3.0 library)
  • ajs_aid= parameter
  • ajs_trait_oebid (will still be appended to Omail links as part of legacy support – but are not used by the olytics 3.0 library)
  • ajs_user_id cookie
  • ajs_anonymous_id cookie

Instead you will see the following being used:

  • olytics.fire() function to fire an event, such as a page view or click.
  • olytics.confirm() function to confirm the identity of a visitor.
  • oly_enc_id= parameter or the ‘olytics encrypted id’, which is the encrypted-customer-id from your omeda database. (will be appended to Omail links for olytics-flagged domains)
  • oly_anon_id= parameter, which is the anonymous cookie id.
  • oly_enc_id cookie, which is just the name of the cookie where olytics 3.0 stores the encrypted-customer-id.
  • oly_anon_id cookie, which is the name of the cookie where olytics 3.0 stores the olytics anonymous cookie id.

With olytics 3.0 you will no longer have an analytics.js import script on your site. Instead you will have an olytics 3.0 import script. You will need to update any analytics.track() functions to olytics.fire() function as well as update any analytics.identify() function to olytics.confirm() functions.

olytics 3.0 script

You should include the olytics.css import:

<link rel="stylesheet" href="https://olytics.omeda.com/olytics/css/v3/p/olytics.css" />

You will also need the olytics 3.0 javascript import below.

For those upgrading from olytics 2.0 to 3.0: the olytics key for this script is not the same key you were given for olytics 2.0. You will be given a new key with your setup documentation.

<script type="text/javascript">
// olytics 3.0
window.olytics||(window.olytics=[]),window.olytics.methods=["fire","confirm"],window.olytics.factory=function(i){return function(){var t=Array.prototype.slice.call(arguments);return t.unshift(i),window.olytics.push(t),window.olytics}};for(var i=0;i<window.olytics.methods.length;i++){var method=window.olytics.methods[i];window.olytics[method]=window.olytics.factory(method)}olytics.load=function(i){if(!document.getElementById("olyticsImport")){window.a=window.olytics;var t=document.createElement("script");t.async=!0,t.id="olyticsImport",t.type="text/javascript";var o="";void 0!==i&&void 0!==i.oid&&(o=i.oid),t.setAttribute("data-oid",o),t.src="https://olytics.omeda.com/olytics/js/v3/p/olytics.min.js",t.addEventListener("load",function(t){for(olytics.initialize({Olytics:i});window.a.length>0;){var o=window.a.shift(),s=o.shift();olytics[s]&&olytics[s].apply(olytics,o)}},!1);var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(t,s)}},olytics.load({oid:"YOUR-OLYTICS-KEY"});
</script>

Please also note that olytics 2.0 cookies will transfer over to olytics 3.0 as visitors visit your site with the new 3.0 javascript.

Update your Google Analytics reports

Once you have adopted olytics, you will start to see some or all of the following query parameters on the urls in your GA reports:

  • ajs_uid
  • ajs_trait_oebid
  • oly_enc_id
  • otc

For example: https://mysite.com/?ajs_uid=3484575474&ajs_trait_oebid=873DFEWEE323&oly_enc_id=3484575474&otc=9234872GSGF423423FGS

Clear instructions are available here: https://www.lunametrics.com/blog/2015/04/17/strip-query-parameters-google-analytics/

Some of the benefits of gathering this behavioral data for your website visitors includes the ability to…

  • Target your customer base
    • as granular as a per-topic or as wide as a category
    • gives you the ability to ask questions like “How many of my customers visited a ‘Widgets Whitepaper’ page on my website”?
  • Identify types of visitors
    • power users based on visit activity and recency
    • ones who abandon your subscription page
  • Engage both your known and anonymous users
    • send email deployments to known users with topics of interest tailored to them
    • setup conferences in cities where your known and anonymous visitors are generally located
  • View reports
    • gain insight on cross-topic visitor activity
    • pathing which allows you to see how your users are getting to your site

What Does It Capture?

  • Your defined behavioral taxonomy
  • IP Address
  • Browser (Chrome, Firefox, IE, etc)
  • Device (Windows 7, iOS 8, Android)
  • Device Type (Personal computer, Smartphone, Tablet, Smart TV)
  • Referring Domain/URL (www.google.com, etc)
  • Visitor Location based on IP Address – when available.

Easy Setup

  • Create a Behavior. Generally you will have 1 behavior per website. Examples:
    • widget.omeda.com – Page Visit
    • subscriptionsignup.omeda.com – Page Visit
  • Define a Taxonomy – or use an existing one from you current HTML meta tags
    • Standard olytics Fields:
      • category – “News”, “Flowers”,
      • tag – “New Widgets Ready to Hit the Market”, “Flowers for a August Wedding”
    • Custom fields (replace section with whatever you like):
      • section – “Paid Section”, “Free Section”
  • Paste scripts into your web pages
  • Start collecting data

Tagging Your Content

  • category
    • General category for your page
    • Recommended no more than 5 categories per page
    • Examples:
      • Flowers
      • Tech News, News, Widgets
      • Widgets
  • tag
    • Any term(s) you want to tag your page with
    • Recommended no more than 5 tags per page
    • More specific than a category
    • Examples:
      • Best Flowers for a August Wedding
      • iWatch Release Date
      • Widget Sales are Up
      • Bears, Blackhawks, Bulls
  • Any field that makes sense to you (section / subsection used as an example)
    • Any term(s) you want to assign to that field
    • Examples:
      • section – “Paid Section”, “Free Section”
      • subsection – “Marketing Paid”, “Advertisement Paid”

Implementations

Custom Javascript

  • Specific Script code on each page
  • Example:
<script>
olytics.fire(
  {
    behaviorId: 'AAABBBCCCDDDEEE',      // Encrypted Behavior ID - supplied by Omeda
    category: 'Flowers,Orchids',        // Open Text - Comma-delimited. Limit of 5 values recommended.
    tag: 'Greenhouses,Potting,Watering', // Open Text - Comma-delimited. Limit of 5 values recommended.
    section: 'Marketing Paid' // custom field, Open Text - Comma-delimited. Limit of 5 values recommended.
  }
);
</script>
  • Advantages
    • Can track more than just “Page Hits”
    • Can attach to any DOM event
      • onClick
      • onFocus
      • onSearch
  • Disadvantages
    • Custom code on every page
    • Requires Web Developer to implement

Using html <meta> tags

  • Prerequisites
    • Your web site must have the ability to add a common script to all pages (generally this can be done in a common header or footer)
    • Your current CMS systems allow <meta> tag maintenance
  • Example:
<meta name="olyticsCategory" content="Flowers,Orchids" > 
<meta name="olyticsTag" content="Greenhouses,Potting,Watering" > 
<meta name="customField" content="CustomField1,CustomField2" > 
  • Only the <meta> tags for your page would need to be maintained
  • Advantages
    • Once script is implemented, there is no need for technical person going forward
    • Non technical staff can maintain the category and tag attributes for a page
  • Disadvantages
    • Can only track “Page Hits”

Customer Tracking

General

  • Anonymous Customers
    • No personal information – only visit information according to your taxonomy.
    • Stored as anonymous in your database
  • Known Customers
    • User visits http://widget.omeda.com/ with special parameters: oly_enc_id={encrypted_customer_id}
    • Example: http://widget.omeda.com/?oly_enc_id=7900G4596589G2
    • Only has to be done once, cookie is updated with Omeda’s Universal ID (customer_id)
    • If an Anonymous cookie already exists for that person, data from Anonymous customer is merged into Known customer

Tracking customers across domains

Example: If a customer is browsing my site http://widget.omeda.com/ and I have a link that takes them to a registration page at http://widget.omedasignup.com

Since cookies are domain-specific, if customers are browsing across domains, the links need to be appended with the Anonymous cookie id (oly_anonid) and the Known omeda customer id (oly_encid).

My link on http://widget.omeda.com/ would look something like this: http://widget.omedasignup.com/?oly_enc_id=7900G4596589G&oly_anon_id=1b6cd7e2-d230-4e25-b53b-49bdad457e65. So when a customer clicks on the link to go to the signup page, the script at widget.omedasignup.com reads the oly_enc_id and oly_anon_id – appending the first 2 to the cookie.

Note: make sure if you are appending oly_enc_id or oly_anon_id to a url, that you never pass oly_enc_id=null or oly_anon_id=null. This creates problems identifying your customer.

Identifying and tracking known customers on your own Login or Signup Forms

Rather than pass Omail passing the oly_enc_id, you may also manually fire the following javascript function to confirm the identity of the visitor:

olytics.confirm('encrypted-customer-id');

This will append the omeda encrypted-customer-id to the cookie, in the same way passing the &oly_enc_id= param does.

This can be very useful in conjunction with a login or signup form on your site and our API Suite.

  • Signup Form Example:
  1. User visits your website and browses some pages anonymously.
  2. User signs up for your website
  3. When the user signs up – you can call the Save Customer and Order API and then the Run Processor API.
  4. Now that the customer has been saved and processed to your omeda database, you can use the encrypted customer id returned from the Run Processor API and fire the analytics.track javascript function when the confirmation page loads, passing in the encrypted-customer-id.
  5. Your known customer will now be tracked as they browse your site.
  • Login Example:
  1. User visits your website and browses some pages anonymously.
  2. User decides to login to your site with their credentials
  3. When the user logs in – you can call the Validate Authentication APICustomer Lookup By Email or Customer Lookup Service By External ID to retrieve the encrypted-customer-id.
  4. Now you can use fire the analytics.track javascript function when the confirmation page loads, passing in the encrypted-customer-id.
  5. Your known customer will now be tracked as they browse your site.

Omail Integration

omail tracking.png

  • Attaches ?oly_enc_id= parameter to all links, confirming the identify of your Customer.

olytics In OnQ

  • Ability to Query Anonymous and Known

  • Ability to Query category and tag

  • Query By Date

  • Query By Action Count

  • Query By Operating System, Device Type, Browser, and Referring Domain

Testing Your olytics Setup!

  • Verifying your Anonymous visits are being recorded
  1. Visit some of your pages in a browser of your choice.
  2. Grab the value from the ‘oly_anon_id’ cookie for your domain. Make sure to remove the %22 from the ends. In the screenshot below, the domain is omeda.com – yours will differ.

olytics30 cookie pic.png

  1. Visit Customer View.
  2. Select advanced search.
  3. enter the oly_anon_id into the ‘Alternate ID’ field and search.
  4. Select the customer that is returned
  5. In the olytics section you can view your anonymous tag and category visit information:

olytics customer view.png

  • Verifying your Known customer visits are being recorded
  1. Visit some of your pages in a browser of your choice.
  2. Grab your encrypted customer id from Customer View.
  3. Append &oly_enc_id={encrypted-customer-id} to your website url for a page that is using olytics.
  4. Go back to the Customer View search screen.
  5. Search for your customer again.
  6. In the olytics section you should see your tag and category visit information.

Troubleshooting

  • Why aren’t my anonymous visits being recorded?
    • Suggestions:
      • Double check that oly_enc_id from the cookie is the one you are searching in Customer View.
      • Check if you are browsing as a known customer by looking at the oly_enc_id cookie. If the cookie value is not-null, then you are browsing as a known customer.
  • Why aren’t my known visits being recorded?
    • Suggestions:
      • Double check if the oly_enc_id that you are expecting has been stored on your cookie correctly by looking at the oly_enc_id cookie for your domain. If the cookie value is null or different from what you expect, then you were not properly identified.
  • Why is my olytics data not showing up in OnQ?
    • Suggestions:
      • OnQ is rebuilt nightly so anonymous data may take a day to show up. If you need OnQ to rebuilt sooner for testing purposes, contact your development contact at Omeda.
Last Updated On November 27, 2018
Tags:
Knowledge Base Feedback