Before you begin this tutorial

Before beginning this tutorial, you should ensure that you have already created a project and have your Lighthouse Analytics ID.

Your Lighthouse analytics ID will only be available to you after you have published your project and looks like LH-XXXXXX, where the X's define a unique identifier for your project.

Why use Lighthouse?

Lighthouse analytics has been specifically to work together with all your 360º assets, whether it is your Smart Galleries or your Landing Pages, using Lighthouse, you will be able to get in depth reporting delivered directly to the analytics system of your choice.
Lighthouse currently supports persisting analytics data to the following platforms.

If you would like to use a different system, speak with us so that we can make it happen for you.

After completing this tutorial

Once you have completed this tutorial, you will be able to see analytics events on your project dashboard as well as in your own Analytics Tracking platform

Lets get started

Including Lighthouse Analytics script

The Lighthouse Analytics script is a small chunk of code that allows events to be pushed to Lighthouse Analytics servers.
This code chunk should be included once on every page.

Place this code in the <head>  section of your html

<!-- Lighthouse Analytics -->
<script>
!(function(a,c,r,o,n,y,m){a['LightHouseObject']=n;a[n]=a[n]||function(){(a[n].queue=a[n].queue||[]).push(arguments);};y=document.createElement(r),m=document.getElementsByTagName(r)[0];y.async=!0;y.src=o;m.parentNode.insertBefore(y,m);})(window,document,'script','https://libraries.vdroom-travel.com/analytics/analytics.bundle.js','vde');
vde('create', 'LH-XXXXXX');
</script>
<!-- End Lighthouse Analytics -->

Notice the last line vde('create', 'LH-XXXXXX') , make sure t change this to your own Lighthouse Analytics ID.

Reporting Interactions

Every time you want to report something, you are a sending a "Parcel" to our servers. These parcels are then persisted to your own analytics system.

Lighthouse analytics uses a command queue in order to manage the transfer of these parcels. And every Parcel must be assigned to a type.

Parcel types are "event" or "transaction" and new parcel types may be included in the future.

Triggering Events

Already implemented events

Please note that VDroom Smart Galleries and VDroom Landing Pages already implement a set of default analytics events for you.

Testing Parcel

During implementation, you don't want to persist "dirty" data to your analytics. In order to avoid this, you can add a directive into your javascript which will not persist to your analytics account, but will give you feedback about the validation of your Parcel
window.vde_debug = {debug: true}; 

Sending a Parcel

All parcels use the command queue and follow a similar pattern. Parcels are added to a queue, so this command can be used safely even before our analytics script has completed loading.

vde([command], ...fields, {extra fields});

Commands
Create
This is used to create a tracking instance, you can create multiple tracking instances. An example of this is when you have multiple galleries from different projects appearing on the same page. Your galleries will then create their own trackers for each project

Set
Use this to set specific parameters on your tracker(s) that will be persisted as a part of your Parcel

Send
Persist a Parcel to the servers

Remove
Delete an existing tracker. This useful for sites that are Single Page Applications and perform a cleanup between history changes.

Events that you should implement

Transaction
Transaction event play a big role in understanding the value that 360º media plays in the convertibility of your product. We highly recommend that you implement this Parcel on your product order confirmation page.

Trigger the event by using the following Javascript function

vde('send','transaction', order_id<string>, revenue:<number>, currency:<string>);

Parameters

order_id

  • Your order id or confirmation id that you can use to map the conversion to an order.

revenue

  • Sales value rounded to two decimal places

currency

  • Three Letter currency code
  • Supported codes are
AED
ARS
AUD
BOB
BRL
CAD
CHF
CLP
CNY
COP
CRC
CZK
DKK
EUR
GBP
GTQ
HKD
HNL
HUF
IDR
ILS
INR
ISK
JPY
KRW
MOP
MXN
MYR
NIO
NOK
NZD
PEN
PHP
PLN
PYG
QAR
RON
RUB
SAR
SEK
SGD
THB
TRY
TWD
USD
UYU
VEF
VND
ZAR
Did this answer your question?