segmentio / segmentio/analytics.js-integrations

analytics.js firing events before clevetap can be initialized

Open
#740 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
125
Forks
136
Avg merge
2h 45m
Merged PRs (30d)
1

Description

Upon looking, we found that analytics.js is firing events (via analytics.track) before clevertap can be initialized.
t requests are for segment
a?type=page is the first request that is triggered on clevertap initialization
From the screenshot, we can see that the request goes properly to the segment, but since clevertap is not initialized at that point, the events are being lost in the process.

Could you help us with a workaround for this?
Screenshot 2023-03-27 at 11 54 59 AM

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing analytics.track in analytics.js alongside the Clevertap initialization flow, using the reported Segment t requests and the Clevertap a?type=page request as timing markers. Confirm the initialization ordering shown in the screenshot and define done as preventing events from being lost before Clevertap is ready.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.