MCPcopy Create free account
hub / github.com/DavidWells/analytics / setSessionId

Function setSessionId

packages/analytics-plugin-amplitude/src/browser.js:173–181  ·  view source on GitHub ↗

* Set Amplitude session ID. Ref https://bit.ly/3vElAym * @param {string} sessionId - Minimum visit length before first page ping event fires

(sessionId)

Source from the content-addressed store, hash-verified

171 * @param {string} sessionId - Minimum visit length before first page ping event fires
172 */
173function setSessionId(sessionId) {
174 if (typeof window.amplitude === 'undefined') {
175 console.log('Amplitude not loaded yet')
176 return false
177 }
178 const amplitudeInstance = window.amplitude.getInstance()
179 amplitudeInstance.setSessionId(sessionId)
180 amplitudeInstance.enableTracking()
181}
182
183export default amplitudePlugin

Callers 1

amplitudePluginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected