0

We have this DE that has TrackingCode and OtherID fields. Is there a way to overwrite the %%TrackingCode%% value (this should show as TrackingCode+OtherID+DateTimeNow when the comm is sent)? Now, we do not want to update the TrackingCode values in the DE, we just want it in the content only because TrackingCode (in comms content) is the one being captured by our analytics team during send time.

We cannot do an upsertDE and update the TrackingCode values because the function works after personalizations are being executed, which in this case, TrackingCode = usual Trackingcode, then the upsert is the last/next to be executed but the 1st trackingcode value in the comms is already sent to analytics even if we have updated the DE.

1

if you store the value in an ampscript variable, then you can easily overwrite that. You just would need to reference the AMPscript var when referring to that value.

E.g.

%%TrackingCode%%%%OtherID%%%%=NOW()=%%

Would turn into:

%%[
SET @TrackingCode = AttributeValue("TrackingCode")
SET @OtherID = AttributeValue("OtherID")
SET @Now = Now()

/* Change TrackingCode value */
SET @TrackingCode = "MyOtherValue"
]%%

%%=v(@TrackingCode)=%%%%=v(@OtherID)=%%%%=v(@Now)=%%

This should let you handle 'at send' adjustments to the values without affecting the data stored in the DEs.

| improve this answer | |
  • Thanks, @Gortonington but what we wanted is not just to display %%=v(@TrackingCode)=%%%%=v(@OtherID)=%%%%=v(@Now)=%% but to overwrite the value of AttributeValue("TrackingCode"). Assigning it to a new variable won't work as AttributeValue("TrackingCode") is the one being sent to analytics. – Clintt Erno Jan 17 at 10:23
  • @ClinttErno As I said the only way is via an ampscript var. Otherwise you need to overwrite the actual data in the de. – Gortonington Jan 17 at 11:57
  • Ok, thanks for the info. – Clintt Erno Jan 17 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.