Getting Segment to Production
As an autonomy customer, by default, Chord provides you with Sources for your Front-end and Back-end Staging environments... During the testing phase, it is recommended that your Destinations point to the Staging Environments.
Once you are ready to move to Production, Destinations should link to the Production Source.
Let's take a look below.
Your Productions environments will be set up by your agency when you are ready to move to Production.
Each Store has its own Write Key, a unique identifier that points to and funnels data to the right source.
When you are moving out of the testing phase and going Live, your Production environment will have its own Write Key, which must be added to your front and back end.
Navigate to your Production environment in Segment and click Connections --> Sources.
Search for your newly added <YourStoreName> Back-End (Production).
Click on Settings ---> API key
Copy the Write Key and navigate to your Production OMS
Go to Settings --> Store --> Environment Variables
Paste the key in SEGMENT_WRITE_KEY and click Save
If SEGMENT_WRITE_KEY Variable is not listed, scroll down and add it and click the + to save
Navigate to your Production environment in Segment and click Connections --> Sources
Search for your newly added <YourStoreName> Front-End (Production)
Copy and Paste the snippet to the <head> tag in the HTML file
Verifying Destinations connections
If you have Destinations that are connected to your Staging Source, and want to connect them to your newly added Prod environment, navigate to your Sources.
Click on your Front or Back-end Production source and click Add Destination
Select your App and click Configure <App Name>
You will be able to copy the existing setup to your Production Env
We suggest that the Destination name * refers to your Production Environment: Ex:
Google Analytics (Production)
Your settings have been saved, you just need to enable the Destination
We recommend that you disable the Staging connection to avoid conflicts in data/analysis
if you have any questions or need help, please reach out to us at firstname.lastname@example.org