1

I've followed the steps here: https://segment.io/libraries/analytics.js without deviating from their instructions.

Here are the headers from one of the requests:

Request URL:http://api2.segment.io/v1/t
Request Headersview source
  Content-Type:text/plain
  Origin:http://staging.mywebsite.com
  Referer:http://staging.mywebsite.com/
  User-Agent:Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36
Request Payloadview source
  {userId:null, sessionId:ccea006ec74cc613, event:Loaded a Page,…}
    apiKey: "eijofijoi4r"
    callbackId: 350
    context: {}
    event: "Loaded a Page"
    properties: {url:http://staging.mywebsite.com/, referrer:,…}
    sessionId: "ccea006ec74cc613"
    userId: null

Both the Preview and the Response have no data available. Other attributes worth mentioning:

Method: POST
Status: (cancelled)
Type: Pending

What are the reasons that could cause a status of (cancelled)?

Are there any steps I can take to gather more information?

3 Answers 3

3

I was seeing this too -- turns out that the AdBlock extension was blocking the requests.

Sign up to request clarification or add additional context in comments.

Comments

0

It could possibly be due to a deeply nested object inside properties that the API doesn't like. I think we take objects nested up to 7 levels deep last I checked.

Comments

0

I've faced the same issue with Segment analytics SDK. Intermittently the API calls to analytics were getting canceled. The issue was that the default timeout in the SDK was set to 300ms. Whenever the network call faced a stall of value greater than 300ms (Probably due to too many requests), the call got canceled. Fixed the issue by setting the timeout to 1000s. https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#extending-timeout

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.