From a61845cf904ffbbd33bfd6e0326c05bbaf3d0075 Mon Sep 17 00:00:00 2001 From: ayan Date: Fri, 5 Apr 2024 22:21:35 +0530 Subject: [PATCH] docs: update README for event label --- README.md | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a088376..2a8bfcd 100644 --- a/README.md +++ b/README.md @@ -99,11 +99,15 @@ Use the `resolveSimpleEvent` method to log simple events ```ts import {resolveSimpleEvent} from '@bloomscorp/bloomsight.js'; -resolveSimpleEvent('65d735b122354c8ba6a489c2'); +resolveSimpleEvent( + '65d735b122354c8ba6a489c2', + 'Contact Us CTA button' +); ``` -| Option | Type | Description | Mandatory | Default | -|:-------------|:---------|:-------------------|:----------|:--------| -| `eventToken` | `string` | Id of simple event | ✅ | NA | +| Option | Type | Description | Mandatory | Default | +|:-------------|:---------|:------------------------------------------------|:----------|:--------| +| `eventToken` | `string` | Id of simple event | ✅ | NA | +| `label` | `string` | a label/name for the event for future reference | ❌ | '' | ### Data Event @@ -113,15 +117,20 @@ Use the `resolveDataEvent` method to log data events ```ts import {resolveDataEvent} from '@bloomscorp/bloomsight.js'; -resolveDataEvent('66d735b122355c8ba6a456f8'), { - productId: 120, - sku: 'PROD021298' -}); +resolveDataEvent( + '66d735b122355c8ba6a456f8', + { + productId: 120, + sku: 'PROD021298' + }, + 'Add to Wishlist CTA button' +); ``` -| Option | Type | Description | Mandatory | Default | -|:-------------|:---------|:-----------------------------------------|:----------|:--------| -| `eventToken` | `string` | Id of data event | ✅ | NA | -| `eventData` | `Object` | additional metadata in key, value format | ✅ | NA | +| Option | Type | Description | Mandatory | Default | +|:-------------|:---------|:------------------------------------------------|:----------|:--------| +| `eventToken` | `string` | Id of data event | ✅ | NA | +| `eventData` | `Object` | additional metadata in key, value format | ✅ | NA | +| `label` | `string` | a label/name for the event for future reference | ❌ | '' | ### Page View Event