Expand my Community achievements bar.

Is it possible to update VEC Custom Code via an API

Avatar

Level 1

Our team uses Target to modify pages on our site to serve unique experiences to users. We don't use the VEC and prefer to update the DOM using scripts entered as Custom Code modifications that get appended to the <head>.

 

We host the code for all of our Activities in GitLab, but this requires that we copy-paste our code from GitLab over to the Custom Code modification field in Target.

 

THE ASK: Is there a REST API route where we can push our code from GitLab into the Custom Code fields of an Activity. 

We want a solution where our code is synced so we don't have to maintain code in 2 places, and to also speed up development time.

 

We also explored making our code public and serving the code via the src attribute in the script tag. 

ie: <script src="http://our-publically-hosted-code.js"> </script> but the overhead of the extra fetch request (when the script gets appended to our site's page) was too large; it was taking too long to load the code which was causing a flicker when modifications were performed at the top of our page.

 

If there is no API route to update the Custom Code field in a headless fashion, is there another solution to integrate Target with our codebase?

 

Thank you, Adobe Team,

1 Reply

Avatar

Community Advisor

Hi @cdscsdc , there's this previous similar question, which you mind find helpful.

 

Also, here's the full list of api - including creating/updating offers and creating/updating activities: https://developer.adobe.com/target/administer/admin-api/

I hope this can get you in the right direction.


I share weekly Adobe tips on LinkedIn—connect with me!

Every Wednesday: "Something a client recently asked..."

LinkedIn Profile