Skip to content

Commit

Permalink
fix(src/{capture-eye,modal/modal}.ts): fix engagement link default va…
Browse files Browse the repository at this point in the history
…lue and tracking

Signed-off-by: James Chien <james@numbersprotocol.io>
  • Loading branch information
shc261392 committed Oct 18, 2024
1 parent a065d0e commit 66c0aeb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/capture-eye.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ export class CaptureEye extends LitElement {
* Url of the engagement image.
*/
@property({ type: String, attribute: 'eng-img' })
engagementImage = Constant.url.defaultEngagementImage;
engagementImage = '';

/**
* Url of the engagement link.
*/
@property({ type: String, attribute: 'eng-link' })
engagementLink = Constant.url.defaultEngagementLink;
engagementLink = '';

/**
* Text of the action button.
Expand Down
6 changes: 5 additions & 1 deletion src/modal/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,11 @@ export class CaptureEyeModal extends LitElement {
// 0: User-customized link (not provided by us)
// 1: Default engagement link
// 2, 3, ...: Future rotating engagement links
const subid = this._engagementLink ? '0' : '1';
const subid =
!this._engagementLink ||
this._engagementLink === Constant.url.defaultEngagementLink
? '1'
: '0';
interactionTracker.trackInteraction(
TrackerEvent.ENGAGEMENT_ZONE,
this.nid,
Expand Down

0 comments on commit 66c0aeb

Please sign in to comment.