Solved

Use of `domain` option

  • 13 September 2021
  • 2 replies
  • 21 views

what is the significance of domain option in Amplitude_options
amplitude.getInstance().init(amplitudeKey, id, AMPLITUDE_OPTIONS)

icon

Best answer by MikkoKarvonen 14 September 2021, 07:09

what is the significance of domain option in Amplitude_options
amplitude.getInstance().init(amplitudeKey, id, AMPLITUDE_OPTIONS)


It’s related to defining the domain for the Amplitude HTTP cookies. You read more from here or searching for “cookie domains”.

View original

2 replies

Userlevel 4
Badge +2

what is the significance of domain option in Amplitude_options
amplitude.getInstance().init(amplitudeKey, id, AMPLITUDE_OPTIONS)


It’s related to defining the domain for the Amplitude HTTP cookies. You read more from here or searching for “cookie domains”.

Userlevel 3
Badge +2

Hi @rishi_ , to add on to Mikko’s comment, the domain option is used to set a custom domain for the Amplitude cookie. To include subdomains, add a preceding period, eg: .amplitude.com. You can read more about our JS options https://amplitude.github.io/Amplitude-JavaScript/Options/. I hope that helps!

Reply