# Custom Analytics

## <mark style="color:green;">What is Custom Analytics?</mark>

This enables the endless opportunities to create custom events as per your need. You can track the analytics based on the native functionalities(ex. navigation bar buttons) that you are using in Twinr plus any event from your webpage. Below are the examples.

<mark style="color:red;">**NOTE**</mark><mark style="color:red;">: Custom event tracking is only available for premium plan users.</mark>

## <mark style="color:green;">List of Custom Events</mark>

### <mark style="color:orange;">**1.) Navigation Bar Button Events:**</mark>&#x20;

You can set analytics for each native navigation bar buttons on Twinr. Below are the examples.

* **on\_click** **Linker Button Analytics:**&#x20;

See [here](https://help.twinr.dev/screen-customization/tab-bar/navigation-bar/navigation-bar-buttons/linker-button) to know how to add linker button.

To setup on\_click event of any linker button you are adding on Twinr navigation bar, enable the toggle and give the event name that relates to this button click. This name will appear as event name under firebase analytics. **Example**: nav\_bar\_buttonname\_button\_clicked

<figure><img src="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2FjzFA6pEJCWcak06tMP79%2FScreenshot%202023-11-29%20at%208.10.35%E2%80%AFAM.png?alt=media&#x26;token=91915052-79f6-487b-9690-a7f8be5727f7" alt="" width="375"><figcaption></figcaption></figure>

* **on\_click Custom Button Analytics:**&#x20;

See [here](https://help.twinr.dev/screen-customization/tab-bar/navigation-bar/navigation-bar-buttons/custom-button) to know how to add custom button.

To setup on\_click event of any custom button you are adding on Twinr navigation bar, enable the toggle and give the event name that relates to this button click. This name will appear as event name under firebase analytics. **Example**: nav\_bar\_buttonname\_button\_clicked

<figure><img src="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2FhHcDK2IEQ5q3pM9G21Ik%2FScreenshot%202023-11-29%20at%2011.52.16%E2%80%AFAM.png?alt=media&#x26;token=2b17d936-f57a-40bc-9ed4-3a2920ae6a82" alt="" width="344"><figcaption></figcaption></figure>

* **on\_click Cart Button Analytics:**&#x20;

See [here](https://help.twinr.dev/screen-customization/tab-bar/navigation-bar/navigation-bar-buttons/cart-button) to know how to add Cart button.

To setup on\_click event of cart button you are adding on Twinr navigation bar, enable the toggle and give the event name that relates to this button click. This name will appear as event name under firebase analytics. **Example**: nav\_bar\_cart\_button\_clicked

<figure><img src="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2F9fPDtzrZXdPppJRgYWYD%2FScreenshot%202023-11-29%20at%2011.57.10%E2%80%AFAM.png?alt=media&#x26;token=f6ca9e24-40f7-4c77-a87f-18837f8b1ef4" alt="" width="349"><figcaption></figcaption></figure>

* **on\_click Native link Sharing Button Analytics:**&#x20;

See [here](https://help.twinr.dev/screen-customization/tab-bar/navigation-bar/navigation-bar-buttons/native-link-sharing) to know how to add native link sharing button.

To setup on\_click event of native link sharing button you are adding on Twinr navigation bar, enable the toggle and give the event name that relates to this button click. This name will appear as event name under firebase analytics. **Example**: nav\_bar\_native\_link\_sharing\_button\_clicked

<figure><img src="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2FHfuwkHJBbPv1GQ7KCSYd%2FScreenshot%202023-11-29%20at%2011.58.09%E2%80%AFAM.png?alt=media&#x26;token=45fb29cc-042e-4fae-8033-a8e1165f0b34" alt="" width="367"><figcaption></figcaption></figure>

* **on\_click Hamburger Button Analytics:**&#x20;

See [here](https://help.twinr.dev/screen-customization/tab-bar/navigation-bar/navigation-bar-buttons/hamburger-menu) to know how to add hamburger button.

To setup on\_click event of each hamburger menus you are adding under hamburger on Twinr navigation bar, enable the toggle and give the event name that relates to this menu click. This name will appear as event name under firebase analytics. **Example**: nav\_bar\_menuname\_clicked

<figure><img src="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2F0nGxbI7U31IT1DotqUnl%2FScreenshot%202023-11-29%20at%2012.10.40%E2%80%AFPM.png?alt=media&#x26;token=c5335b45-e190-4ed8-b754-595c47724d56" alt="" width="361"><figcaption></figcaption></figure>

* **on\_click Multi Language Button Analytics:**&#x20;

See [here](https://help.twinr.dev/screen-customization/tab-bar/navigation-bar/navigation-bar-buttons/linker-button) to know how to add multi language button.

To setup on\_click for multi language button you are adding on Twinr navigation bar, enable the toggle and give the event name that relates to this button click.  This name will appear as event name under firebase analytics. **Example**: nav\_bar\_multi\_language\_button\_clicked

<figure><img src="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2FN2fzxYXsuJlKbH4jqo15%2FScreenshot%202023-11-29%20at%208.51.56%E2%80%AFAM.png?alt=media&#x26;token=db49ef21-331e-48cb-a715-52893a947622" alt="" width="360"><figcaption></figcaption></figure>

### <mark style="color:orange;">2.) Webpage element click Events:</mark>

Using webpage element click events , you can track click event of any element of your website.

**For example**, you want to track the click event of "Add to Cart" button click event.

**1.)** Click on **CREATE NEW EVENT**

<figure><img src="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2FxLUN827y27H2ZBxgoxCE%2FScreenshot%202023-11-29%20at%202.12.12%E2%80%AFPM.png?alt=media&#x26;token=c2c5aff4-19ef-48d5-ba93-ab4b0ccdb590" alt=""><figcaption></figcaption></figure>

**2.)** Add the needed information for tracking. For example, you want to track the click event of Listing page "Add to Cart" button click event.

**Element's Identifier:** The identifier of the web page element for which you want to track the on click event.

**Event Name:** The name of the event that will appear in firebase.

**Property Key & Value**: This can be any related pair of the key-value. For example, you want to check from which page the "Add to Cart" button was clicked. o the property is "clicked\_from" and the value is "Product listing Page" because the identifier of the "Add to Cart" button is unique for product list page.

<figure><img src="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2FarRw87U8KCGgdi6xdvkC%2FScreenshot%202023-11-29%20at%202.10.10%E2%80%AFPM.png?alt=media&#x26;token=21d36ca5-59fd-4c27-bfd4-833ea86e3ec6" alt=""><figcaption></figcaption></figure>
