IdukkiIdukki
Industry playbook

UGC widget for WooCommerce and WordPress: install, tag, measure

WordPress gives you three ways to place a UGC gallery: a theme footer script, a Custom HTML block, or a shortcode. Here is which to use, how product tagging works with WooCommerce, and what add-to-cart does on Woo today.

The WooCommerce store ran a page builder, a caching plugin, a lazy-load plugin and a "social feed" plugin that had not been updated since 2023 and loaded jQuery twice. Removing that last one was the biggest speed win of the quarter. The gallery that replaced it was one shortcode.

In this article

WordPress is the platform where the install question has the most possible answers, which is why merchants get stuck. There are three that work; pick by who will maintain the site.

Three ways to place the gallery

1. A header-and-footer plugin (most teams)

Plugins such as WPCode or Insert Headers and Footers let you add a script to every page without touching the theme. Paste the loader into the footer slot. Then, on any page, add a Custom HTML block containing the placeholder div. Theme updates never touch it.

2. functions.php (developer-maintained sites)

php
add_action( 'wp_footer', function () {
  echo '<script async src="https://widget.idukki.io/idukki.js"></script>';
} );

Use a child theme so the hook survives updates. The placeholder div still goes in the page content or template where the gallery belongs.

3. A shortcode you write once

php
add_shortcode( 'idukki', function ( $atts ) {
  $a = shortcode_atts( [ 'guid' => '', 'pid' => '' ], $atts );
  $pid = $a['pid'] ? ' data-filter-pid="' . esc_attr( $a['pid'] ) . '"' : '';
  return '<div data-ugc="idukki" data-guid="' . esc_attr( $a['guid'] ) . '"' . $pid . '></div>';
} );

With the shortcode in place, editors drop [idukki guid="…"] into any post or product description. On a WooCommerce single product template, pass the product id so the gallery filters to that product: [idukki guid="…" pid="{product id}"], or in a template file use get_the_ID() to fill it.

Getting WooCommerce products into the tagger

WooCommerce ships a product exporter (Products, then Export) that writes a CSV with SKU, name, price, image and permalink. Import that file in the Idukki dashboard and map the columns once. Stores that already run a Google Shopping feed plugin can paste the feed URL instead and schedule a re-sync, which keeps prices honest when a sale starts.

Variable products are the one wrinkle: tag the parent product, not each variation. The gallery links to the parent page, where WooCommerce handles variation selection the way it always does.

Add to cart and measurement on Woo, honestly

On a stock WooCommerce theme the gallery can add to cart in place, because WooCommerce exposes its cart parameters and fragments on the page and the widget uses them. Some themes and optimisation plugins strip or defer those globals; when they are missing, the gallery falls back to opening the product page rather than failing silently. If you see the fallback and want in-place cart writes, the usual culprit is a script-defer plugin excluding jQuery from the page.

Measurement follows the same shape as the BigCommerce guide: impressions, post clicks, product clicks and add-to-cart intent are tracked on every platform; attributing an order to a post needs the platform's order webhook, which is live for Shopify and scheduled for WooCommerce. Until then, the WooCommerce numbers stop at intent.

The plugin you should remove

Most WordPress stores that come to us already have a social-feed plugin. The typical one injects its own copy of jQuery, loads every image at full size, and fetches the feed on the client on every page view. Replacing it with a single deferred loader is usually the largest Largest Contentful Paint improvement available on the site, before any UGC benefit is counted. Measure before and after with PageSpeed Insights; the widget speed programme post shows what to look for.

FAQs

  • Is there an Idukki WordPress plugin?

    Not in the WordPress directory today. The script-and-div install works on every WordPress site, including page builders, and does not depend on plugin updates.

  • Does it work with Elementor, Divi or Bricks?

    Yes. Each builder has an HTML or code widget; paste the placeholder div into it. The loader goes in the site footer as described above.

  • Why does add-to-cart open the product page on my store?

    The widget writes to the WooCommerce cart only when the store exposes its cart parameters on the page. A script-defer or optimisation plugin that removes jQuery from the page triggers the product-page fallback.

Sources

  1. 1WooCommerce documentation: Product CSV importer and exporter
  2. 2WordPress developer resources: Shortcode API
  3. 3Idukki: Inside the widget speed program
  4. 4Idukki: WooCommerce platform page
#woocommerce#wordpress#shoppable-video#install

Continue reading

1 piece in this cluster

These long-form pieces on the Idukki blog link back to this article, go deeper on the cluster.

More from Rohin Aggarwal

We use cookies

We use essential cookies to run this site and optional analytics cookies to understand how it’s used. You can change your choice anytime in our privacy policy.