forceOnline
Last update: January 25, 2024
- Topics:
- Variables
CREATED FOR:
- Admin
- Developer
The forceOnline()
method lets you override the automatically detected state of AppMeasurement.
Only use this method when
trackOffline
is enabled. Using this function outside of offline tracking can cause data loss.AppMeasurement automatically detects the online state of the device. You can use the forceOnline()
method to force AppMeasurement to treat hits as if the device was online. This method does not take any arguments, and does not return any value. Its only purpose is to override the online state in AppMeasurement.
Force online using the Web SDK
The Web SDK does not support offline tracking.
Force online using the Adobe Analytics extension
There is not a dedicated field in the Adobe Analytics extension to use this variable. Use the custom code editor, following AppMeasurement syntax.
s.forceOnline() in AppMeasurement and the Analytics extension custom code editor
You can call the s.forceOnline()
method anywhere in your implementation after you instantiate the Analytics object.
s.forceOnline();
Analytics
- Implement Adobe Analytics
- Analytics Release Notes
- AppMeasurement release notes
- Analytics variables, functions, and methods
- Overview
- Configuration variables
- Configuration variables overview
- abort
- account
- ActivityMap.linkExclusions
- ActivityMap.regionExclusions
- ActivityMap.regionIDAttribute
- charSet
- collectHighEntropyUserAgentHints
- cookieDomain
- cookieDomainPeriods
- cookieLifetime
- currencyCode
- decodeLinkParameters
- dynamicVariablePrefix
- fpCookieDomainPeriods
- linkDownloadFileTypes
- linkExternalFilters
- linkInternalFilters
- linkLeaveQueryString
- linkTrackEvents
- linkTrackVars
- linkURL
- offlineHitLimit
- offlineThrottleDelay
- trackDownloadLinks
- trackExternalLinks
- trackingServer
- trackingServerSecure
- trackInlineStats
- trackOffline
- useBeacon
- useLinkTrackSessionStorage
- usePlugins
- visitorID
- visitorNamespace
- writeSecureCookies
- Page variables
- Functions and methods
- Plug-ins
- Plug-ins overview
- addProductEvar
- addProductEvent
- apl
- cleanStr
- formatTime
- getAndPersistValue
- getGeoCoordinates
- getNewRepeat
- getPageLoadTime
- getPageName
- getPercentPageViewed
- getPreviousValue
- getQueryParam
- getResponsiveLayout
- getTimeBetweenEvents
- getTimeParting
- getTimeSinceLastVisit
- getTimeToComplete
- getValOnce
- getVisitDuration
- getVisitNum
- inList
- manageVars
- Numbers suite
- p_fo
- pt
- removeFromList
- websiteBot
- Integrate module
- Prepare to implement Adobe Analytics
- Implement Analytics using Experience Platform Edge
- Implement Analytics using the Adobe Analytics extension
- Implement Analytics using JavaScript
- Implement Analytics on other platforms
- Implement Analytics on mobile devices
- Implementation use cases
- Validate your implementation
- Frequently asked questions
- Review your implementation