static web page, multiple environment (dev/staging/prod)
our web site index.html is static, and I was wondering how can I enable working with different optimizely projects, each loaded in a different environment (dev/staging/prod).
e.g. for dev, I'd like the html to load the optimizely snippet that belongs to the sandbox project
wheares for prod environment, I would need
Other analytics tools that I've used with provide a different token per environment, but here it seems that for the static HTML page (which I have), I need some other manipulation.
any help would be appreciated,
Solved! Go to Solution.
I'm not positive that I understand your question. Each Optimizely project will have a unique snippet, and typically people will create a separate project for each environment. The experiments associated with a given project will only run on pages that include that project's snippet, so all you need to do to use different projects with different environments is to place the appropriate snippet in the head of the matching environment's code.
Unless you're saying there is some reason you can't do this?
Yes, the reason I cannot do that, is that I strive to keep the same static code regardless of the environment.
meaning, index.html should be the same static file in dev/QA/Prod. it may execute differnt logic, but the hard coded <script src=""> that optimizely enforces, cannot be manipulated.