TugusDeveloper Docs
Script API

Identity API

Set the client ID manually for cross-device tracking, e.g. after login.

Set the client ID manually for cross-device tracking — e.g. after login.

// Set the client ID after login (enables cross-device)
tugus.setClientId('user_12345')

// Read the current client ID
const cid = tugus.getClientId()

// Read the UTM data from the current session
const utm = tugus.getUtm()
// → { source: 'google', medium: 'cpc', campaign: 'de_brand_q4' }

// Reset UTMs (e.g. on logout)
tugus.clearUtm()