View google-promotions-json-ld
/* | |
AMPscript.com | |
https://ampscript.com/company-logo-in-gmail-using-promotions-tab/ | |
*/ | |
%%[ | |
SET @JSONStart = Concat('<', 'script type="', 'application/ld+json"','>') | |
SET @JSONEnd = Concat('<','/','script','>') | |
]%% | |
%%=TreatAsContent(@JSONStart)=%% | |
[{ |
View parse-json-ssjs-ampscript
/* | |
AMPscript.com | |
https://ampscript.com/parsing-json-with-ampscript/ | |
*/ | |
%%[ set @JSON = '{"name": AMPscript.com","email": "AMPscript@ampscript.com"}' ]%% | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> |
View gmail-deal-badge
<!-- Deal Badge --> | |
<!-- AMPscript.com --> | |
<!-- https://ampscript.com/company-logo-in-gmail-using-promotions-tab/ --> | |
<div itemscope="" itemtype="http://schema.org/DiscountOffer"> | |
<meta itemprop="description" content="AMPscript.com"> | |
<meta itemprop="discountCode" content="AMPSCRIPT"> | |
<meta itemprop="availabilityStarts" content="2020-03-10T00:00:00Z"> | |
<meta itemprop="availabilityEnds" content="2020-04-05T00:00:00Z"> | |
</div> |
View gmail-custom-logo
<!-- Custom Logo --> | |
<!-- AMPscript.com --> | |
<!-- https://ampscript.com/company-logo-in-gmail-using-promotions-tab/ --> | |
<div itemscope itemtype="http://schema.org/Organization"> | |
<meta itemprop="name" content="AMPscript" /> | |
<meta itemprop="logo" content="https://image.s7.sfmc-content.com/lib/fe9013737562047473/m/1/ampscript.png" /> | |
</div> |
View add-to-publication-list
/* | |
AMPscript.com | |
*/ | |
SET @rr = CreateObject("RetrieveRequest") | |
SetObjectProperty(@rr, "ObjectType", "List") | |
AddObjectArrayItem(@rr,"Properties","ListName") | |
AddObjectArrayItem(@rr,"Properties","ID") |
View ssjs-run-automation
/* | |
AMPscript.com | |
https://ampscript.com/how-to-run-automations-more-frequently-using-ssjs/ | |
*/ | |
<script runat="server"> | |
Platform.Load("Core","1.1.1"); | |
var automationCustomerKey = "[Customer Key Goes Here]" | |
var rr = Platform.Function.CreateObject("RetrieveRequest"); | |
Platform.Function.SetObjectProperty(rr, "ObjectType", "Automation"); | |
Platform.Function.AddObjectArrayItem(rr, "Properties", "ProgramID"); |