I have seen such an exam question:
ChatGPT advise something like that:
<script>
window.targetGlobalSettings = {
property: "your-property-token-here"
};
</script>
However I do not see that property in window.targetGlobalSettings():
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
It refers to this code:
Is it also compliant with at.js?
So if I would like to have Dev and Prod then I set up two properties and then put that snippet above at.js code?
<script>
function targetPageParams() {
return {
"at_property": "property_for_dev"
};
}
</script>
// at.js for dev
<script src='at.js'>
</script>
Unfortunately its not explained here: https://experienceleague.adobe.com/en/docs/target-dev/developer/client-side/at-js-implementation/fun...
Views
Replies
Total Likes
If you have your connection via WEB SDK, aka, datastream integration, I wouldn't encourage you using at.js. It's either one or the other. I am recommending Web SDK, it is a little bit more confusing, indeed, but it is faster and better integrated with your CDP.
If you want to have dev and prod, link those separated environments using your datastream integration. In your prod mbox, use the prod environment from Tagret, for the DEV sandbox, use the dev environment from Target.
You basically don't need any snippet code with web SDK as long as you already have your Tag script in place.
If you have this script in your head section of the web page you are trying to use target on, using the datastream connection it will connect without any problems.
Views
Replies
Total Likes
Thanks very much!
So what is from your perspective art-of-state Target implementation with Data Collection in 2025?
What I did:
1. Create two properties in Target (Dev and Prod):
2. Created two Datastreams in Data Collection.
Dev Datastream mapped to dev property and dev Target environment
Prod Datastream mapped to prod propery and Target prod environment
3. I create one Tag. In the Web SDK Extension I put:
Prod Datastream for Prod Tag ENV
Dev Datastream for Dev Tag ENV
4. Tag Environements. I have got three different scripts. I put one script from Production into Production WWW and then Development into Dev Environment like that:
5. What do you think about that? Should I use that? It would be then included in Target reporting?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies