Skip to content

Commit

Permalink
lint cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-astra-via committed May 31, 2024
1 parent 6c1ed85 commit c4a7f32
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {

Check failure on line 1 in src/index.ts

View workflow job for this annotation

GitHub Actions / build-test (20.x)

Replace `⏎··ComponentSettings,⏎··Manager,⏎··MCEvent,⏎` with `·ComponentSettings,·Manager,·MCEvent·`
Client,
ComponentSettings,
Manager,
MCEvent,
Expand Down
2 changes: 1 addition & 1 deletion src/requestBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function getToolRequest(
// Determine if the session is engaged to set the 'seg' value
const pageviewCounter = parseInt(client.get('pageviewCounter') || '0')
const conversionCounter = parseInt(client.get('conversionCounter') || '0')
let engagementDuration = parseInt(client.get('engagementDuration') || '0')
const engagementDuration = parseInt(client.get('engagementDuration') || '0')

// Session will be marked engaged if longer than 10 seconds, has at least 1 conversion event, and 2 or more pageviews
if (
Expand Down
6 changes: 3 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, MCEvent } from "@managed-components/types"
import { Client, MCEvent } from '@managed-components/types'

export const flattenKeys = (obj: { [k: string]: unknown } = {}, prefix = '') =>
Object.keys(obj).reduce((acc: { [k: string]: unknown }, k) => {
Expand Down Expand Up @@ -59,7 +59,7 @@ export const countPageview = (client: Client) => {

// conversion events in session counter
export const countConversion = (event: MCEvent) => {
const {client} = event
const { client } = event
let conversionCounter = parseInt(client.get('conversionCounter') || '0') || 0
if (conversionCounter === 0 && event.payload.conversion) {
client.set('conversionCounter', '1', { scope: 'session' })
Expand All @@ -69,4 +69,4 @@ export const countConversion = (event: MCEvent) => {
scope: 'session',
})
}
}
}

0 comments on commit c4a7f32

Please sign in to comment.