Skip to content

Commit f3686d2

Browse files
authored
Merge pull request #5275 from segmentio/vanand17-patch-9
Add info about keepalive flag in AJS
2 parents a426ceb + a2f729e commit f3686d2

File tree

1 file changed

+4
-0
lines changed
  • src/connections/sources/catalog/libraries/website/javascript

1 file changed

+4
-0
lines changed

src/connections/sources/catalog/libraries/website/javascript/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ The Analytics.js utility methods help you change how Segment loads on your page.
343343
- [On (Emitter)](#emitter)
344344
- [Timeout](#extending-timeout)
345345
- [Reset (Logout)](#reset-or-log-out)
346+
- [Keepalive](#keepalive)
346347

347348
### Load
348349

@@ -473,6 +474,9 @@ The `reset` method only clears the cookies and `localStorage` created by Segment
473474

474475
Segment doesn't share `localStorage` across subdomains. If you use Segment tracking on multiple subdomains, you must call `analytics.reset()` for each subdomain to completely clear out the user session.
475476

477+
### Keepalive
478+
479+
You can utilize this in instances where an API call fires on a hard redirect, and are missed from getting captured in Segment. If you set this flag to true, it enables firing the event before the redirect. This is available for all events. You can read more about this in the [Github PR](https://github.com/segmentio/analytics-next/issues/768#issuecomment-1386100830){:target="_blank"}.
476480

477481

478482
## Managing data flow with the Integrations object

0 commit comments

Comments
 (0)