Questions tagged [ampscript]

AMPscript is a scripting language that you can embed within HTML emails, text emails, landing pages, SMS messages, and push notifications from MobilePush

122 questions
4
votes
0 answers

Can i use web components in AMP pages

I am trying to use web components in AMP page with amp-script but it's not working. I am trying to add following code in index.html
loading...
Rohit Ambre
  • 921
  • 1
  • 11
  • 25
2
votes
1 answer

Amp-script does not show the result for addEventListener "load"

I want to copy all A to B. Using plain javascript, it works as it is. But it does not work when I use amp-script. It also doesn't show any error(s). A
111
222
333
B
Joe Kdw
  • 2,245
  • 1
  • 21
  • 38
2
votes
0 answers

How to get document.referrer inside AMP page with ?

I am trying to serve a banner for users coming from Google so I need a referrer to do this. I've managed to do it on normal pages but on AMP I can't get it to work since document.referrer returns undefined. Any ideas how to get it on an AMP…
2
votes
1 answer

AMPscript lookuprows error on synchronized data extension

My users will be using Distributed Marketing quick send from the standard Contact record. I need to pull User data into a content template for the email signature. Right now I'm just trying to get the phone number from the user sending the…
DOC Oclock
  • 21
  • 2
2
votes
1 answer

How to add a monitoring script in an AMP website?

I've been trying to solve this problem for about a month. I have this whole website developed in AMP code (no WordPress). And I need to include a monitoring script on the website to have an integration with RD Station(a marketing platform to analyze…
2
votes
0 answers

Issue in shortening URL using Bitly - ampscript

I have a use case where I need to shorten my Url and send it in a SMS.I have an HTML page which on calling, updates my customer's details. It basically updates an attribute of an object in Sales Cloud for that particular lead. When user clicks on…
Krati Garg
  • 145
  • 1
  • 10
2
votes
1 answer

AMPSCRIPT - String building with a for loop

I want to print out the different names of friends that are in this database. Depending on the name chosen, it'll print out the list of friends associated with that name. %%[ FOR @y = 1 TO @friendRowcount DO Set @friendRow =…
pedro
  • 61
  • 1
  • 1
  • 8
2
votes
3 answers

IF statement in AMPScript

I have a little problem with if statement as it populates only last elseif %%[IF @Add3 == "Y" AND @Add4 == "Y" AND @Add5 == "N" THEN SET @WhichNom1 = "1" SET @WhichNom2 = "2" ELSEIF @Add3 == "Y" AND @Add4 == "N" AND @Add5 == "Y"…
dan123
  • 43
  • 1
  • 1
  • 5
1
vote
1 answer

Navigate in amp-script

I have an input select that sets a state "selectedStateId", an amp-autocomplete that sets "selectedCity", and finally an input text as a search bar that sets "inputTerms". With these I make a URL like:…
Simon
  • 55
  • 10
1
vote
1 answer

AMP change link URL on click

I am trying to change the HREF of a link (
user1399063
  • 151
  • 1
  • 1
  • 4
1
vote
1 answer

Low resolution Email Preview in Salesforce for marketing cloud connect emails

Question about Marketing Cloud Connect - In case of Individual Email Result in Salesforce, an email preview is sent from MC to SF object along with a thumbnail preview of the email template (as base64 encoded image). This thumbnail has two…
1
vote
0 answers

Combining multiple rows of data into one email - Marketing Cloud

I'm having an issue trying to combine multiple rows in a DE. As an example, I want to take the below data (Policy Data) and combine data where the policy number is the same and display that information within an email. I've copied below as well my…
rom29
  • 11
  • 1
1
vote
1 answer

How to get specific value from Promise Result Object in getBoundingClientRect?

Here is part of my code returning a Promise, I am using getBoundingClientRect Async because it runs in AMP virtual DOM (amp-script): JS: button.addEventListener("mouseenter", function(event){ let target = event.target; let…
1
vote
0 answers

Uncaught ReferenceError: eval is not defined at amp-script

I have added an amp-script to my amp page as described but I am getting the following error message when testing: [amp-script] Uncaught ReferenceError: eval is not define I believe is related with the eval() is used to execute JS loaded async from…
jvrdom
  • 358
  • 1
  • 8
  • 18
1
vote
0 answers

How to block an amp-components until other amp-component is resolved.?

I want to block some amp-components (amp-image, amp-ad, or amp-iframe) until one of the amp components is resolved. ie. - amp-captcha is solved or amp-script ran successfully. I checked that we can achieve something similar using an amp-consent…
freesoul
  • 236
  • 1
  • 13
1
2 3
8 9