Tag Archives: AmpScript

AMPscript – Count records in data extension, show percentages

I had a project where the client wanted the email recipient to take a simple survey by clicking on a certain link that answers the survey questions. It’s a way to fake a form in a sense. What is your … Continue reading

Posted in AmpScript, ExactTarget | Tagged , , , , , | Comments Off on AMPscript – Count records in data extension, show percentages

Pulling data from a data extension like a Relational table

Pulling data from a data extension: Pulling data from a data extension outside of the recipient list DE. Let’s say I have a DE that is my list of email recipeints and there is another DE with a list of … Continue reading

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , | Comments Off on Pulling data from a data extension like a Relational table

Import data into a data extension using FTP

FTP data file into “import” folder In ET, go to “Interactions / Import” and click “Create” Name: Your choice File Naming Pattern: This is the name of the file you uploaded using FTP. Make sure to include file extension (.csv). … Continue reading

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , , | Comments Off on Import data into a data extension using FTP

Adding possessive apostrophe to names – AMPscript

So we have some personalization in an email where we want to greet the recipient using their first name. In the example the first name was a pet name and the email was alerting the recipient that it was time … Continue reading

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , , , , | Comments Off on Adding possessive apostrophe to names – AMPscript

ExactTarget AMPscript Base64 Encode

VAR @email, @encodedEmail, @DecodedEmail SET @email = emailaddr SET @encodedEmail = Base64Encode(@email) SET @DecodedEmail = Base64Decode(@encodedEmail) Email: %%= v(@email) =%% Encoded Email: %%= v(@encodedEmail) =%% Decoded Email: %%= v(@DecodedEmail) =%%

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , , , | Comments Off on ExactTarget AMPscript Base64 Encode

Format date/time via AmpScript

—————————- Today’s Date Substitution String (Short Date Format): %%xtshortdate%% 8/14/2011 —————————- Today’s Date Substitution String (Long Date Format): %%xtlongdate%% Sunday, August 14, 2009 —————————- Today’s Date MM/dd/yyyy: %%=Format(Now(),”MM/dd/yyyy”)=%% 08/14/2011 —————————- Today’s Date plus 7 days (no formatting): %%=DateAdd(Now(), “7”,”D”)=%% 8/21/2011 … Continue reading

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , | Leave a comment

ExactTarget Facebook Like

My experience using ExactTarget has been with mostly with using HTML-base (paste) emails. Not using their templates, so for my purposes, I went to the page below and went to the section, “How to Insert a Facebook Like Button into … Continue reading

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , , | Leave a comment

AmpScript loops

Loops FOR loop %%[ FOR @i = 1 TO 9 DO ]%% Number: %%=v(@i)=%% %%[ NEXT @i ]%%

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , | Leave a comment

AmpScript landing page

Landing Pages Link from Email to landing page. Insert Landing Page ID between [default] tags. Click <a conversion=”false” alias=”here” title=”here” href=”%%microsite_base_url[default]3156318[/default]%%”>here</a> to go to the landing page. %%=ContentAreaByName(“my contents\Fuel Like a Pro\ET_Test”)=%%

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , , | Leave a comment

AmpScript date

Date //This will show the current Date and Time, plus 14 days::::: %%[ VAR @currentSystemTime SET @currentSystemTime = DateAdd(Now() ,”14″,”D”) ]%% hello %%=v(@currentSystemTime)=%% ————————- // This will add a number to another number pulled from a field %%=Add([POSTAL_CODE],300)=%% ————————- // … Continue reading

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , , | Leave a comment

AmpScript output

Output (render to page): create and set a variable. Assign it’s value from a field, then render it to the page. This example is not practical as you could just use personalization (%%FIRST_NAME%%). %%[ var @R_F_NAME Set @R_F_NAME = FIRST_NAME … Continue reading

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , | Leave a comment

AmpScript external content

External Content: %%httpget “http://targetbase.com/images/common/nav_logo.jpg”%% %%httpget “http://gatorade-emails.s3.amazonaws.com/[FIRST_NAME].txt”%% %%=GetPortfolioItem(“example.gif”)=%% %%=ContentArea(“24642”)=%% %%=Image(“joescrabshack”,”DefaultImage”)=%% %%=treatascontent(HTTPGet(“http://gatorade-emails.s3.amazonaws.com/fuel-like-a-pro/ET_Decline_Form.html”))=%% Set @content = HTTPGet(“http://www.example.com/”)

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , | Leave a comment

ExactTarget AmpScript – Output (render to page)

Output (render to page): %%[ Output(“Hello World!”)) ]%% ———- Output a variable: %%[ var @PERSONALIZATION_ASSET_02 Set @PERSONALIZATION_ASSET_02 = Output(v(@url)) ]%% ———- Output and Concat: %%[ var @logo Set @logo = nav_logo.jpg Output(Concat(“<img src=http://targetbase.com/images/common/”,@logo,”>”)) ]%%

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , | Leave a comment

ExactTarget AmpScript – External Content

External Content: %%httpget “http://targetbase.com/images/common/nav_logo.jpg”%% %%httpget “http://gatorade-emails.s3.amazonaws.com/[FIRST_NAME].txt”%% %%=GetPortfolioItem(“example.gif”)=%% %%=ContentArea(“24642”)=%% %%=Image(“joescrabshack”,”DefaultImage”)=%% %%=treatascontent(HTTPGet(“http://gatorade-emails.s3.amazonaws.com/fuel-like-a-pro/ET_Decline_Form.html”))=%%

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , , , | Leave a comment