=== Terovania Game Marketing Widgets for Steam® ===
Contributors: terovania
Tags: steam, widget, wishlist, ga4, marketing
Requires at least: 6.0
Tested up to: 6.8
Stable tag: 1.0.5
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a customizable Steam widget to your WordPress site with GA4-ready tracking features, UTM tracking, and GDPR-friendly implementation.

== Description ==

**The first completely trackable and GDPR-friendly Steam widget solution for WordPress!**
This plugin allows you to integrate a responsive and customizable Steam game widget without using external iframes – fully hosted on your own site.

Unlike the official Steam iframe widget, this plugin offers:
- ✅ **Trackable wishlist button clicks** (Google Tag Manager & GA4 compatible)
- ✅ **Custom UTM parameters** for tracking your Steam page links
- ✅ **Fully responsive layout** optimized for mobile & desktop
- ✅ **GDPR-friendly** (no iframes, external scripts, embedded content or cookies)

Perfect for indie developers, publishers, and marketing teams who want **analytics-ready game landing pages** without breaking privacy rules.

**Why choose this over the official Steam widget?**
- The official widget loads external content (iframe) → not GDPR-friendly
- No easy event tracking → this plugin adds full GTM & GA4 support
- No UTM link control → this plugin enables custom campaign tracking

**Plugin Highlights:**
- Dynamic Steam API integration (auto-loads game info by App ID)
- Fully customizable design without coding
- Gutenberg block with **native Toolbar controls** (easy drag & drop):
  - Set **Steam App ID** via Dropdown (with validation)
  - **Language chooser with search functionality** (maps to Steam API languages)
  - Toolbar **toggles**: Show Price / Age Rating / Feature Icons / Release Info
- Inspector with **help texts** for all important fields (App ID, UTM, Footnote, CTA)
- Steam data language:
  - Uses the selected language for Steam content (description, price/ratings)
  - **Automatic English fallback** if a language has no localized text
  - Note: UI labels follow the WordPress site language
- Fully responsive layout, optimized for mobile & desktop
- **GDPR-friendly**: no Steam iframe, optional local image caching
- **UTM parameters** for tracking your outbound Steam links in Steam analytics
- **Tracking**: pushes `steamWidgetImpression` and `steamWishlistClick` to the dataLayer (GTM/GA4-ready)

📌 **Note:** Premium features coming soon (advanced color customization and additional layouts).

== Disclaimer ==
This plugin is not affiliated with, endorsed, or sponsored by Valve Corporation.
"Steam" and the Steam logo are trademarks or registered trademarks of Valve Corporation.
All rights reserved by their respective owners.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install directly via the WordPress Plugin Directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Add the **Steam Widget block** in your Gutenberg editor.
4. Enter your **Steam App ID** and adjust colors, UTM parameters, and optional credit in the block settings.
5. (Optional) Configure your **Google Tag Manager or GA4** for wishlist click & impression tracking.

== Frequently Asked Questions ==

= Does this plugin use the official Steam widget? =
No. This plugin uses the Steam Store API to retrieve game data and renders the widget on your server for GDPR compliance.

= Is this plugin GDPR-friendly? =
Yes. Unlike the official Steam iframe widget, this plugin does not load external resources from Valve and does not set cookies.

= Can I track widget impressions and clicks? =
Yes! The plugin pushes **dataLayer events** for:
- `steamWidgetImpression` (when the widget enters the viewport)
- `steamWishlistClick` (when the wishlist button is clicked)
These can be integrated into GA4 or Google Tag Manager.

= Can I customize the widget design? =
Yes. You can adjust colors and branding in the Gutenberg block inspector. Premium features (coming soon) will allow more flexibility.

== Screenshots ==

1. Steam Widget block in Gutenberg editor with settings panel
2. Frontend view of the Steam widget (default style)
3. Color customization options in the block settings
4. Example of GA4/GTM tracking integration for wishlist clicks
5. Fully responsive design on desktop and mobile

== Changelog ==

= 1.0.5 =
* New: Native **Toolbar Dropdown** to edit the Steam **App ID** (replaces browser prompt) with validation
* New: **Language search dropdown** in the Toolbar; extended language mapping to Steam API (e.g. *koreana, schinese, tchinese, latam, brazilian*, …)
* New: **Toolbar toggles** for Show Price, Show Age Rating, Show Feature Icons, Show Release Status & Date
* New: **Inspector help texts** for App ID, UTM Source, UTM Campaign, Footnote Symbol, Custom CTA Label
* New: **English fallback** for Steam descriptions when no localized text is available (editor shows a hint)
* Change: Moved to `block.json` registration; cleaned editor wrapper to fix selection/highlight issues
* Change: Reworked editor interactions (pointer-events/overlay) for reliable block selection
* Improvement: Output escaping for wrapper markup to satisfy **WP Plugin Check**
* Improvement: Minor UI wording & accessibility tweaks
* Tested up to WordPress **6.8**

= 1.0.4 =
* Added local image caching for GDPR compliance
* Improved error handling for Steam API requests
* Code cleanup and WP Plugin Check compliance

= 1.0.3 =
* Added UTM parameter support for Steam links
* Implemented hover color customization
* Added impression tracking via Intersection Observer
* Improved Inspector UI for Gutenberg block
* Added text domain and .pot file for localization

= 1.0.2 =
* Fixed hover state issues for CTA button
* Added branding toggle and premium feature placeholders

= 1.0.1 =
* Initial release with Gutenberg block, Steam API integration, and wishlist button tracking.

== Upgrade Notice ==
= 1.0.5 =
Major UX update: native Toolbar controls (App ID, language search, visual toggles), extended language support with fallback, improved editor behavior, and Plugin Check compliance fixes. Recommended for all users.

== License ==
This plugin is licensed under the GPL v2 or later.