Skip to content
Login Contact

Flowcards AMP transformations setup and operations

AMP transformations let you repurpose existing AMP pages for Flowcards without code changes. Most publishers already have AMP pages. With minor tweaks, they become effective Flowcard content, no upfront technical investment required.

AMP transformation configuration interface showing operation list and live preview|690x431

AMP pages are designed for standalone reading. When loaded inside a Flowcard, three common problems appear:

  • Oversized headers: Navigation bars and branding headers consume vertical space. On a Flowcard’s initial snap point, the user sees chrome instead of content.
  • Broken dynamic components: Elements like amp-list that rely on JS and external requests don’t render until the Flowcard reaches its interactive state, leaving blank areas.
  • Top media blocking the title: A large image pushes the article title below the visible area of the initial snap point.

Content transformations solve these problems by modifying the AMP document in real time before it renders inside the Flowcard.

Transformations are created in Experiences Settings > Transformations as reusable templates. Once created, a transformation can be applied to any Flowcard. This is typically a one-time setup during onboarding.

  1. Navigate to Experiences Settings > Transformations.
  2. Click + New Transformation and give it a name.
  3. Enter a Test URL, the AMP page you want to transform. The live preview on the right shows the result.
  4. Click Add operation to add transformation operations. Each operation targets specific elements in the AMP document.
  5. Stack multiple operations to build the complete transformation.
  6. Click Save.

The transformation is now available from any Flowcard’s configuration.

Flowcard AMP transformation editor with test URL input and live mobile preview|690x431

Operations modify the AMP document’s HTML, CSS, JSON, and attributes. Click Add operation and search or select from the list.

OperationWhat it does
Append HTML elementInjects new HTML inside a parent element. Parameters: parent selector, conditional HTML selector, HTML content
Remove HTML elementRemoves elements matching a CSS selector from the document
Reparent HTML elementMoves an element from its current position to a new parent in the DOM
Set HTML attributeSets an attribute on a target element. Parameters: target CSS selector, attribute name, value
Replace HTML attribute JSONReplaces a JSON value inside an HTML attribute
OperationWhat it does
Append classAdds a CSS class to elements matching a selector. Parameters: target CSS selector, class name, limit (max elements to affect)
Remove classRemoves a CSS class from elements matching a selector
Append stylesInjects additional CSS rules into the document
OperationWhat it does
Merge JSONMerges JSON data into an existing JSON structure
Replace JSONReplaces a JSON structure entirely
Replace JSON attributeReplaces a specific attribute within a JSON structure
Remove JSON attributeRemoves an attribute from a JSON structure
Enhance JSON attributeModifies a JSON attribute value with additional data
OperationWhat it does
Preload imageAdds preload hints for images to improve loading performance
Resource URLs absoluteConverts relative resource URLs to absolute paths
Move root vars to bodyMoves CSS custom properties from the root to the body element
GoogleAnalytics RecommenderAdds Google Analytics tracking configured for Recommender experiences
GoogleAnalytics ExperimentAdds Google Analytics tracking configured for A/B testing experiments

Most AMP pages have prominent header bars that waste vertical space inside a Flowcard. Remove them so content appears immediately at the initial snap point.

  1. Add a Remove HTML element operation.
  2. Set the target CSS selector to match your header (e.g., header, .nav-bar, .site-header).
  3. Repeat for any secondary navigation bars.

Large images push the article title out of view. Remove the top media from the AMP document and configure the Flowcard’s hero image instead. This gives you the parallax effect while keeping the title visible at the initial snap point.

  1. Add a Remove HTML element operation targeting the hero image container.
  2. In the Flowcard’s Content tab, set the hero image to Auto-detect to pull the same image from the page’s structured data.

Proper attribution of Flowcard-driven pageviews requires specific tracking operations.

  1. Add a GoogleAnalytics Recommender operation for content recommendation tracking.
  2. Or add a GoogleAnalytics Experiment operation if the Flowcard is part of an A/B test.

Minor CSS issues like broken paddings, margins, or layout shifts can be corrected with two approaches:

  1. Add an Append styles operation with corrective CSS rules.
  2. Or use Append class to apply existing utility classes to specific elements.

Every transformation includes a live preview. Enter a test URL and the preview renders the transformed AMP document in a mobile device frame. Changes appear immediately as you add or modify operations.

Click Open in browser below the preview to see the full transformed page.

Test with multiple URLs from your site. A transformation that works for one article may break on another if the DOM structure varies across templates.

What problems do AMP transformations solve for Flowcards?

AMP transformations fix three common problems when loading AMP pages inside Flowcards: oversized navigation headers that consume vertical space, broken dynamic components like amp-list that leave blank areas, and large top images that push the article title below the visible snap point.

How do I create a Flowcard AMP transformation?

Navigate to Experiences Settings > Transformations, click + New Transformation, enter a test AMP URL for the live preview, add operations targeting specific elements in the AMP document, and click Save. The transformation becomes a reusable template available from any Flowcard configuration.

What types of operations are available in AMP transformations?

Four categories of operations are available: HTML operations (append, remove, reparent elements, set attributes), CSS operations (append or remove classes, inject styles), JSON operations (merge, replace, remove, or enhance JSON attributes), and utility operations (preload images, convert relative URLs, add Google Analytics tracking).