# Analytics

### Areas Visited

* Create a GameObject and place it in the area you want to analyze, name it according to the area&#x20;
  * Add the component Analytics Model
  * Add the component Basic Analytics View&#x20;
  * In Analytics Model add the Basic View and in the Basic view add the model like shown in the image below
  * Give the Resource in Model component according to the area and then write a tag that relays what you are analyzing.

<figure><img src="https://2540630353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4EogWusoxJQBt7VlQ6B%2Fuploads%2FP8pdWdJr7zYPpWyJME6o%2FScreenshot%202022-11-01%20151040.png?alt=media&#x26;token=a83a20bb-1880-41e7-9110-1b3dda9e28c8" alt=""><figcaption><p>Analytics Model and Basic Analytic View</p></figcaption></figure>

* Create a 3D object and place it so it covers the area you want to analyze &#x20;
* Add a trigger with the object you just created in the previous step and make sure you select AnalyticsModel.RecordStart & AnalyticsModel.RecordEnd as shown below&#x20;

<figure><img src="https://2540630353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4EogWusoxJQBt7VlQ6B%2Fuploads%2FZ8Zzp7OZ03xruAVg2gxa%2FScreenshot%202022-11-01%20145309.png?alt=media&#x26;token=df4dae88-a1ca-4a34-a85c-2d45ddbd9146" alt=""><figcaption></figcaption></figure>

### Link Clicks

* Create a GameObject and add the Analytics components Model and Basic Analytics View
* Name this object something similar to "LinkAnalytics"
* Add the Model into Basic View & Basic View into Model like shown below

<figure><img src="https://2540630353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4EogWusoxJQBt7VlQ6B%2Fuploads%2FAykMeVdlVP4FfacuZqAX%2FScreenshot%202022-11-01%20152308.png?alt=media&#x26;token=4af91578-b2fb-4370-a942-97b9dcc5ac2b" alt=""><figcaption></figcaption></figure>

* Name the resource and then the tag according to what you are analyzing (i.e link-visit, for when someone clicks on the link)  &#x20;
* Go to the "Link" Object & in "Link Model" drag the Object in the "Analytiics" section&#x20;

<figure><img src="https://2540630353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4EogWusoxJQBt7VlQ6B%2Fuploads%2FLvNpRcoQEwDM1561wQHg%2FScreenshot%202022-11-01%20152953.png?alt=media&#x26;token=f24916ab-85a6-4853-9fed-4540bb4dc6e2" alt=""><figcaption><p>Analytics</p></figcaption></figure>

### Watch duration of videos

* * Create a GameObject and add the Analytics components Model and Basic Analytics View
  * Name this object something similar to "VideoPlayerAnalytics"
  * Add the Model into Basic View & Basic View into Model like shown below

<figure><img src="https://2540630353-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk4EogWusoxJQBt7VlQ6B%2Fuploads%2F69V7sE9C6O3rq7dM8x4z%2FScreenshot%202022-11-01%20153531.png?alt=media&#x26;token=a11ba237-5d09-413b-b062-23858814109c" alt=""><figcaption></figcaption></figure>

* Name the resource and then the tag according to what you are analyzing (i.e video-visit, for when someone clicks on the link)  &#x20;
* Go to the "videoplayer" Object & in "Video Model" drag the Object in the "Analytics" section
