Building a Purple Experience
Advertisment
Static ads
8min
in default/storefront/assets , c reate a folder for the images of your ads (e g 'ads') 2\ upload some images to the folder to do that, p ress the 'actions' button 3 click on 'upload files' to upload the image you want to use 4 open the earlier created ads json and add an ad click on the '+' button 5\ add an id to your ad (e g test ad) 6\ add the image path and a target url the user will be directed to when clicking on the ad the target can be an external link or an internal link 7\ to add an internal link you may copy the following line and insert it into the target field make sure to change the ending into the name of your view (e g instead of name of view to home ) internal link purple //storefront/assets/resource/dynamic/storefront/index html?title bar=false\&force status bar=true#/name of view if you have ads for different devices, continue with the following steps if not, skip the following steps and continue with step 18 14\ click on the multi select button in the ads json 15\ press on the 'condition' option this will make a field named 'condition' available 16\ in the condition field, enable the fields 'comparevalue' and 'value' 17\ enter ' $context platform ' inside the value field and your desired device in the comparevalue field example if it is an ad for web, the comparevalue is web in the views json, chose a view (e g home) where you want to integrate the ad, press on the '+' button in the content 20\ change the content type to 'ad' 21\ insert your ad id from step 12 into the adid field depending on what content block number your ad is, it will appear in that order on your app e g in this example the content block is #0 so it will be placed at the top right below the app bar 22\ click on the burger menu 23\ click on 'update dynamic resources' 24\ name your changes, e g 'ads' 25\ click on 'merge all files to preview' you have successfully added a simple static ad in the experience html of your app, merged the changes and updated the dynamic resources you can test the result in the preview and push them live if they look fine, to make them visible in your live app