Solved

Use of `domain` option

  • 13 September 2021
  • 2 replies
  • 262 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

View original

2 replies

Userlevel 5
Badge +3

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 6
Badge +8

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