Power Gains on your website
The same selector, chart and table as on ECU-LAB, on your own website — in your language and your colours.
Access
- Have an ECU-LAB account with an active plan.
- In your account → API keys, create a key and list the websites where it may run.
- Paste the code on your website (or install the WordPress plugin) and choose your colours.
1 · Widget (JavaScript)
Two lines in your page. The widget builds the selector, draws the chart and the table, and adapts to the width of the page.
<div class="ecu-lab-gains" data-key="pk_…" data-lang="en"></div> <script src="https://ecu-lab.online/assets/widget/gains.js" async></script>
Optional attributes:
data-key | your public key (pk_…) — required |
data-lang | language: en, de, fr, it, es, pt, nl, pl, cs, sk, hu, no, ro, el, tr, sr, bg, uk, ru, zh, ja |
data-category | cars · trucks · agro · moto · boats · machinery — show a single category (without it, the visitor chooses) |
data-unit | hp · kw |
data-colors | JSON with the colours (names in the table below) |
data-color-hp-tuned … | a single colour, e.g. data-color-hp-tuned="#ff6a00" |
data-disclaimer | your own note under the chart (a note is always shown) |
2 · Iframe
For page builders that do not accept scripts. No border, transparent background; with the script on the page, the height adjusts to the content.
<iframe class="ecu-lab-gains-frame" src="https://ecu-lab.online/embed/gains?key=pk_…&lang=en&c_hp_tuned=ff6a00"
style="border:0;width:100%;height:640px" loading="lazy" title="Power Gains"></iframe>
<script src="https://ecu-lab.online/assets/widget/gains.js" async></script>
Colours go in the address as c_<name>=rrggbb (without #). The iframe only opens on the websites listed on the key.
3 · WordPress plugin
Install the plugin, enter your secret key once in Settings → ECU-LAB Power Gains, then place the shortcode or the “ECU-LAB Power Gains” block wherever you want. The key stays on your server.
[ecu_lab_gains lang="en" category="cars" hp_tuned="#ff6a00" nm_tuned="#0e2342"]
4 · From your server (REST)
For your own integration: JSON responses, authenticated with the secret key. Never put the secret key in a web page.
curl -H "Authorization: Bearer sk_…" \
"https://ecu-lab.online/api/v1/gains/vehicle/12345?lang=en"
| GET | |
|---|---|
/api/v1/gains/config | colours, categories and texts in the requested language |
/api/v1/gains/categories | categories with the number of vehicles |
/api/v1/gains/brands?category=cars | makes in a category |
/api/v1/gains/models?category=cars&brand=… | models of a make |
/api/v1/gains/years?category=cars&brand=…&model=… | years / generations of a model |
/api/v1/gains/engines?category=cars&brand=…&model=…&year=… | engines (id, name, fuel) |
/api/v1/gains/vehicle/{id} | power, torque, Stage 2 where available, chart points and axes |
Common parameters: lang (language of the texts), unit=kw (power in kW instead of hp).
Chart colours
hp_tuned | Power — tuned | #1f74e0 |
hp_stock | Power — stock | #8fa3b6 |
nm_tuned | Torque — tuned | #e8a33b |
nm_stock | Torque — stock | #b39b70 |
stage2 | Stage 2 | #7357d6 |
grid | Grid and lines | #e2e9f1 |
text | Text | #4a5d75 |
accent | Accent (selected fields) | #1f74e0 |
bg | Background (or “transparent”) | transparent |
Any colour you leave out keeps the value saved on your key, then the default.
Rules
- The public key only works on the websites listed on it; the secret key only from a server.
- Limits per account: 120 requests per minute, 20.000 per day.
- The figures are estimates and the note under the chart is always shown.
- Keys work while the account has an active plan; they stop when it expires and start again on renewal.