feat: give Google Ads the App campaign layer, costed against what a sale pays

docs/AD_COPY.md is the new home for the ad copy: five headlines (30 characters) and five
descriptions (90 each), five spares of each for rotation, and the rule that decides the wording —
the app is paid, so "free" cannot appear, and the creatives therefore say "No ads. No uploads.
Fully offline." rather than "Ad-free". The doc checks itself: a python block reads its own tables
and asserts each count and cap, verified against a deliberately over-length row (31 characters with
a stale count) before it was trusted.

It also records the arithmetic the campaign has to clear, because the Console hides it: the price
entered there is *net* and the buyer is charged VAT on top. The live listing reads EUR 3.59 with the
sale at EUR 1.79 — 2.99 x 1.20 and 1.49 x 1.20, the 20% column — where the documents had predicted
only the German 19% figures of 3.56 and 1.77. STORE_LISTING now separates the two numbers, says
which one the strikethrough shows (the gross one, not the EUR 2.99 typed in), and quantifies making
EUR 2.99 the sticker: the tax comes out of the developer's share, so EUR 2.54 a sale becomes
EUR 2.14. PLAY_RELEASE_CHECKLIST carries the correction at the step that enters the price.

For a paid app the install *is* the purchase, so the ceiling is the net per sale — EUR 2.54 at base,
EUR 1.27 during the launch sale — and a target of EUR 0.16 is not a target but a delivery stop: it
implies a 16x return on ad spend that no auction clears. The doc recommends Maximise conversions
first, a EUR 5/day budget sized by what a wrong answer costs, an in-market or custom-segment
audience only if one is wanted at all, and stop/scale rules for the week after. HTML5 last, text,
images and video first — Google's own guidance, quoted.

tools/make-store-assets.sh now renders that image set — 1200x628, 1200x1200, 320x480 — from three
new SVG sources that reuse the icon motif and gradient of icon.svg and feature-graphic.svg verbatim
and embed the committed 03-results screenshot. Two of its checks exist because the first versions
were wrong: comparing the finished PNG with the requested size can never fail, since
--export-width forces it, so the check moved to the *declared* canvas (a sandbox edit to 1200x600
now fails loudly), and --export-area-page is pinned because the cards bleed — the drawing bbox is
1200x710, which an older Inkscape would have squashed into the page. -strip drops the tIME Inkscape
stamps on every render, so two consecutive runs are byte-identical and a rebuild leaves no fake diff
(measured: 0 differing pixels with and without it).

The SVGs are sources, not uploads — Google Ads rejects SVG — so each says so in its header and the
script prints which PNGs to upload. store-assets/app-campaign/ holds those: 8-bit RGB, no alpha.

README points at both the new doc and the new output. No CHANGELOG entry: none of this is an app
change.
This commit is contained in:
2026-10-15 18:01:55 +02:00
parent 64431d5757
commit 7b92da4f8b
11 changed files with 641 additions and 16 deletions
+92 -1
View File
@@ -9,6 +9,16 @@
# so every pixel ends up opaque anyway)
# feature-graphic-1024x500.png 1024 x 500 24-bit PNG, no alpha
#
# and the Google Ads *App campaign* image set, one per orientation, in app-campaign/:
# landscape-1200x628.png 1200 x 628 1.91:1 horizontal placements
# square-1200x1200.png 1200 x 1200 1:1 feed / interstitial
# portrait-320x480.png 320 x 480 2:3 vertical placements
#
# The three ad creatives are not scaled copies of one file: Google Ads matches an asset to the
# placement's orientation, so one landscape image leaves the portrait and square slots empty.
# They embed store-assets/screenshots/phone/03-results.png, so run make-store-screenshots.sh
# first if that file is missing — the check below says so instead of rendering an empty hole.
#
# Output lands in ./store-assets/ *inside* the repo, never in $HOME: the editable sources are
# the SVGs in tools/store-assets/ and these PNGs are the files that get uploaded to the Play
# Console, so they belong with the release they were made for. Pass a directory to override.
@@ -38,6 +48,87 @@ render() { # <svg> <width> <height> <filename> <keep-alpha|flatten>
echo "Writing store assets to $out"
render "$here/store-assets/icon.svg" 512 512 icon-512.png keep-alpha
render "$here/store-assets/feature-graphic.svg" 1024 500 feature-graphic-1024x500.png flatten
echo "Done. Screenshots: ./tools/make-store-screenshots.sh # reads store-assets/raw-screenshots/phone/"
# --- Google Ads App campaign creatives ---------------------------------------------------------
# One file per orientation, and each is composed rather than resized: an asset is matched to a
# placement's orientation, so three honest layouts beat twenty near-duplicates. 5 MB is the size the
# Google Ads image uploader accepts, so an oversized file is flagged here instead of at upload time.
ad_max_bytes=$((5 * 1024 * 1024))
shot="$repo/store-assets/screenshots/phone/03-results.png"
if [ ! -f "$shot" ]; then
echo "error: $shot is missing — all three App campaign creatives embed it." >&2
echo " ./tools/make-store-screenshots.sh # builds it from store-assets/raw-screenshots/phone/" >&2
exit 2
fi
ad_out="$out/app-campaign"
mkdir -p "$ad_out"
render_ad() { # <svg> <width> <height> <filename>
local svg="$1" width="$2" height="$3" name="$4"
# Check the *declared* canvas, not the finished file. --export-width/height forces the output
# size, so measuring the PNG and comparing it with those two numbers would pass every time —
# including for a source edited to a different canvas, which the export flags would then stretch
# into the size the Console asked for. This is the check that catches that.
local root declared_width declared_height
root="$(tr -d '\n' < "$svg" | grep -o '<svg[^>]*>' | head -1)"
declared_width="$(printf '%s' "$root" | grep -oE 'width="[0-9]+"' | head -1 | tr -dc '0-9')"
declared_height="$(printf '%s' "$root" | grep -oE 'height="[0-9]+"' | head -1 | tr -dc '0-9')"
if [ "$declared_width" != "$width" ] || [ "$declared_height" != "$height" ]; then
echo "error: $svg declares ${declared_width}x${declared_height} but is rendered at ${width}x${height}" >&2
echo " that would stretch the composition — fix the SVG or the size in this script" >&2
exit 1
fi
# --export-area-page is explicit rather than implied, because these three bleed: the screenshot
# card is cut by the canvas edge, so the drawing bbox is taller than the page (1200x710 for the
# landscape one). Inkscape 1.x already exports the page here — checked pixel-identical with and
# without the flag, 0 differing pixels — but 0.92 defaulted to the drawing bbox, which would
# rescale this whole composition into 1200x628 and squash it.
inkscape "$svg" \
--export-type=png --export-area-page \
--export-width="$width" --export-height="$height" \
--export-filename="$ad_out/$name" >/dev/null 2>&1
# Flatten against the brand colour: an ad is shown on the placement's own background, so an
# alpha channel is how a stray transparent pixel ends up in something a customer sees.
# -strip follows from the timestamp problem: Inkscape stamps every fresh render with tIME, so
# without it a re-run of this script is pixel-identical but byte-different, and every build
# would leave three "modified" files in git. Stripping is metadata-only — measured 0 differing
# pixels with and without it.
magick "$ad_out/$name" -background '#1B5E20' -alpha remove -alpha off -strip \
PNG24:"$ad_out/$name"
# And the finished file, because an Inkscape old enough to ignore --export-width would write the
# page size here instead — which the declared-canvas check above cannot see.
local got_width got_height
got_width="$(identify -format '%w' "$ad_out/$name")"
got_height="$(identify -format '%h' "$ad_out/$name")"
if [ "$got_width" != "$width" ] || [ "$got_height" != "$height" ]; then
echo "error: $name came out ${got_width}x${got_height}, expected ${width}x${height}" >&2
echo " check the width/height and viewBox in $svg" >&2
exit 1
fi
local warn=''
if [ "$(identify -format '%B' "$ad_out/$name")" -gt "$ad_max_bytes" ]; then
warn=' ⚠️ over the 5 MB image limit — re-encode before uploading'
fi
printf ' %s ' "$ad_out/$name"
identify -format '%wx%h %[channels] %b' "$ad_out/$name"
printf '%s\n' "$warn"
}
echo "App campaign images (Google Ads), shot embedded: $shot"
render_ad "$here/store-assets/app-campaign-landscape.svg" 1200 628 landscape-1200x628.png
render_ad "$here/store-assets/app-campaign-square.svg" 1200 1200 square-1200x1200.png
render_ad "$here/store-assets/app-campaign-portrait.svg" 320 480 portrait-320x480.png
echo "Done. Play: icon-512.png + feature-graphic-1024x500.png"
echo " Ads: app-campaign/landscape-1200x628.png, square-1200x1200.png, portrait-320x480.png"
echo " ^ upload these PNGs; the tools/store-assets/*.svg are sources, and Ads rejects SVG"
echo " Screenshots: ./tools/make-store-screenshots.sh # reads store-assets/raw-screenshots/phone/"
echo " Tablets: FORM_FACTOR=tablet-7in ./tools/make-store-screenshots.sh"
echo " FORM_FACTOR=tablet-10in ./tools/make-store-screenshots.sh"
@@ -0,0 +1,59 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="1200" height="628" viewBox="0 0 1200 628">
<!--
App campaign image, landscape 1.91:1 (1200 x 628) — the orientation Google Ads asks for in
horizontal placements (Display, YouTube in-stream, the feed).
Same palette (#0D3D13 -> #1B5E20 -> #2E7D32) and the same icon motif as icon.svg and
feature-graphic.svg, copied verbatim, so the ad, the store listing and the launcher icon
cannot drift apart.
The screenshot is store-assets/screenshots/phone/03-results.png — the committed Play
screenshot of the *generated* demo library (17 groups, 83.5 MB reclaimable), never a real
library. It is anchored to the card's top edge (xMidYMin slice) so the summary card stays in
frame and the card bleeds off the bottom instead of ending in mid-air.
This file is a *source*, not an upload. Google Ads takes raster image assets (PNG or JPG) and
rejects SVG — the file to upload is the PNG this source renders to through the script below.
Edit this file, then: ./tools/make-store-assets.sh
-->
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#0D3D13" />
<stop offset="0.55" stop-color="#1B5E20" />
<stop offset="1" stop-color="#2E7D32" />
</linearGradient>
<clipPath id="shot">
<rect x="760" y="150" width="400" height="560" rx="26" />
</clipPath>
</defs>
<rect x="0" y="0" width="1200" height="628" fill="url(#bg)" />
<!-- Icon motif, centred on (165, 195) at ~170 px wide. scale 4.67 = 170 / 36.4, the motif's
own bbox width; translate(-49.8, -46.85) is that bbox's centre, as in feature-graphic.svg. -->
<g transform="translate(165,195) scale(4.67) translate(-49.8,-46.85)">
<g transform="translate(30,22) scale(1.9)">
<path d="M4,5 h16 a1,1 0 0 1 1,1 v12 a1,1 0 0 1 -1,1 h-16 a1,1 0 0 1 -1,-1 v-12 a1,1 0 0 1 1,-1 z"
fill="#FFFFFF" fill-opacity="0.45" />
</g>
<g transform="translate(24,28) scale(1.9)">
<path d="M4,5 h16 a1,1 0 0 1 1,1 v12 a1,1 0 0 1 -1,1 h-16 a1,1 0 0 1 -1,-1 v-12 a1,1 0 0 1 1,-1 z"
fill="none" stroke="#FFFFFF" stroke-width="1.6" />
<path d="M7.5,9 m-1.4,0 a1.4,1.4 0 1 0 2.8,0 a1.4,1.4 0 1 0 -2.8,0" fill="#FFFFFF" />
<path d="M4,17 l4,-5 l3,3.5 l3.5,-4.5 l5.5,6 z" fill="#FFFFFF" />
</g>
</g>
<image id="shot-image" x="760" y="150" width="400" height="560" clip-path="url(#shot)"
preserveAspectRatio="xMidYMin slice"
xlink:href="../../store-assets/screenshots/phone/03-results.png" />
<text id="app-name" x="80" y="360" font-family="DejaVu Sans" font-weight="bold" font-size="62"
fill="#FFFFFF">Foto Dup Finder</text>
<text id="tagline-1" x="82" y="416" font-family="DejaVu Sans" font-size="31"
fill="#FFFFFF" fill-opacity="0.92">Find and remove duplicate photos</text>
<text id="tagline-2" x="82" y="460" font-family="DejaVu Sans" font-size="31"
fill="#FFFFFF" fill-opacity="0.92">No ads. No uploads. Fully offline.</text>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

@@ -0,0 +1,53 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="320" height="480" viewBox="0 0 320 480">
<!--
App campaign image, portrait 2:3 (320 x 480) — the orientation Google Ads asks for in vertical
placements (YouTube Shorts, in-app interstitials).
Google's size for this one is small on purpose, so the composition is different rather than a
scaled copy: identity in the top third at a size that survives a thumbnail, then the committed
demo-library screenshot below it. Text inside the screenshot is texture at this size, which is
why the creative carries its own wording.
Same palette and icon motif as app-campaign-landscape.svg / app-campaign-square.svg.
This file is a *source*, not an upload: Google Ads takes PNG/JPG, so the file to upload is
store-assets/app-campaign/portrait-320x480.png, which this source renders to.
Edit this file, then: ./tools/make-store-assets.sh
-->
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#0D3D13" />
<stop offset="0.55" stop-color="#1B5E20" />
<stop offset="1" stop-color="#2E7D32" />
</linearGradient>
<clipPath id="shot">
<rect x="28" y="200" width="264" height="310" rx="20" />
</clipPath>
</defs>
<rect x="0" y="0" width="320" height="480" fill="url(#bg)" />
<!-- Icon motif, centred on (160, 66) at ~80 px wide (scale 2.2 = 80 / 36.4). -->
<g transform="translate(160,66) scale(2.2) translate(-49.8,-46.85)">
<g transform="translate(30,22) scale(1.9)">
<path d="M4,5 h16 a1,1 0 0 1 1,1 v12 a1,1 0 0 1 -1,1 h-16 a1,1 0 0 1 -1,-1 v-12 a1,1 0 0 1 1,-1 z"
fill="#FFFFFF" fill-opacity="0.45" />
</g>
<g transform="translate(24,28) scale(1.9)">
<path d="M4,5 h16 a1,1 0 0 1 1,1 v12 a1,1 0 0 1 -1,1 h-16 a1,1 0 0 1 -1,-1 v-12 a1,1 0 0 1 1,-1 z"
fill="none" stroke="#FFFFFF" stroke-width="1.6" />
<path d="M7.5,9 m-1.4,0 a1.4,1.4 0 1 0 2.8,0 a1.4,1.4 0 1 0 -2.8,0" fill="#FFFFFF" />
<path d="M4,17 l4,-5 l3,3.5 l3.5,-4.5 l5.5,6 z" fill="#FFFFFF" />
</g>
</g>
<image id="shot-image" x="28" y="200" width="264" height="310" clip-path="url(#shot)"
preserveAspectRatio="xMidYMin slice"
xlink:href="../../store-assets/screenshots/phone/03-results.png" />
<text id="app-name" x="160" y="142" text-anchor="middle" font-family="DejaVu Sans" font-weight="bold"
font-size="28" fill="#FFFFFF">Foto Dup Finder</text>
<text id="tagline-1" x="160" y="172" text-anchor="middle" font-family="DejaVu Sans" font-size="15"
fill="#FFFFFF" fill-opacity="0.92">Find duplicate photos</text>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

@@ -0,0 +1,53 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="1200" height="1200" viewBox="0 0 1200 1200">
<!--
App campaign image, square 1:1 (1200 x 1200) — the orientation Google Ads asks for in feed and
interstitial placements.
Stacked version of app-campaign-landscape.svg: identity on top, the committed demo-library
screenshot bleeding off the bottom edge. Same palette, same icon motif, same source rules —
see that file for the reasoning.
This file is a *source*, not an upload: Google Ads takes PNG/JPG, so the file to upload is
store-assets/app-campaign/square-1200x1200.png, which this source renders to.
Edit this file, then: ./tools/make-store-assets.sh
-->
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#0D3D13" />
<stop offset="0.55" stop-color="#1B5E20" />
<stop offset="1" stop-color="#2E7D32" />
</linearGradient>
<clipPath id="shot">
<rect x="380" y="560" width="440" height="660" rx="30" />
</clipPath>
</defs>
<rect x="0" y="0" width="1200" height="1200" fill="url(#bg)" />
<!-- Icon motif, centred on (600, 175) at ~200 px wide (scale 5.5 = 200 / 36.4). -->
<g transform="translate(600,175) scale(5.5) translate(-49.8,-46.85)">
<g transform="translate(30,22) scale(1.9)">
<path d="M4,5 h16 a1,1 0 0 1 1,1 v12 a1,1 0 0 1 -1,1 h-16 a1,1 0 0 1 -1,-1 v-12 a1,1 0 0 1 1,-1 z"
fill="#FFFFFF" fill-opacity="0.45" />
</g>
<g transform="translate(24,28) scale(1.9)">
<path d="M4,5 h16 a1,1 0 0 1 1,1 v12 a1,1 0 0 1 -1,1 h-16 a1,1 0 0 1 -1,-1 v-12 a1,1 0 0 1 1,-1 z"
fill="none" stroke="#FFFFFF" stroke-width="1.6" />
<path d="M7.5,9 m-1.4,0 a1.4,1.4 0 1 0 2.8,0 a1.4,1.4 0 1 0 -2.8,0" fill="#FFFFFF" />
<path d="M4,17 l4,-5 l3,3.5 l3.5,-4.5 l5.5,6 z" fill="#FFFFFF" />
</g>
</g>
<image id="shot-image" x="380" y="560" width="440" height="660" clip-path="url(#shot)"
preserveAspectRatio="xMidYMin slice"
xlink:href="../../store-assets/screenshots/phone/03-results.png" />
<text id="app-name" x="600" y="375" text-anchor="middle" font-family="DejaVu Sans" font-weight="bold"
font-size="78" fill="#FFFFFF">Foto Dup Finder</text>
<text id="tagline-1" x="600" y="435" text-anchor="middle" font-family="DejaVu Sans" font-size="36"
fill="#FFFFFF" fill-opacity="0.92">Find and remove duplicate photos</text>
<text id="tagline-2" x="600" y="483" text-anchor="middle" font-family="DejaVu Sans" font-size="36"
fill="#FFFFFF" fill-opacity="0.92">No ads. No uploads. Fully offline.</text>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB