# Send goal with dynamic value to Piwik PRO from GTM

**URL:** <https://community.piwik.pro/t/send-goal-with-dynamic-value-to-piwik-pro-from-gtm/1425>\
**Category:** Data collection and tags\
**Created:** [December 22, 2022, 12:40pm UTC](https://community.piwik.pro/t/send-goal-with-dynamic-value-to-piwik-pro-from-gtm/1425 "2022-12-22T12:40:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidkrogstrup](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/davidkrogstrup/32/1078_2.png) [@davidkrogstrup](https://community.piwik.pro/u/davidkrogstrup)\
**Post date:** [December 22, 2022, 12:40pm UTC](https://community.piwik.pro/t/send-goal-with-dynamic-value-to-piwik-pro-from-gtm/1425/1 "2022-12-22T12:40:05Z")

</div>

**On this page:**

> **[Set up goals | Piwik PRO help center](https://help.piwik.pro/support/reports/goals/)**
>
> Goals help you focus on events important for you site or app. You can use them to see when users sign up, buy your product, download a white paper or do anything else that you find essential for your business. In this article, we’ll show you how to...

**This is stated:**  
_Note: If you want to assign goal revenue dynamically, you need to [track a goal manually] and [set a variable] that will hold the revenue value._

But on this page:

> **[Goal conversion tag | Piwik PRO help center](https://help.piwik.pro/support/tag-manager/piwik-pro-goal-conversion/)**
>
> The Goal conversion tag lets you set up goals manually. It’s used when tracking goals with standard methods is impossible. In Tag Manager, you can set it up in a hassle-free way. Before you set up the tag, you need to create a goal in Analytics,...

It is only described how to setup this through Piwik PRO Tag Manager.

How can I send a goal manually to Piwik PRO with a dynamic value via javascript in Google Tag Manager?

I know how to send a custom event from GTM - but then Piwik PRO does NOT use my event value as the Goal value.

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [December 22, 2022, 1:44pm UTC](https://community.piwik.pro/t/send-goal-with-dynamic-value-to-piwik-pro-from-gtm/1425/2 "2022-12-22T13:44:31Z")

</div>

Just use this one:

```auto
var _paq = _paq || [];
_paq.push(["trackGoal", '<goal_id>', {{ YourVariable }}]);

```

Link to docs here: [API — Piwik PRO Analytics Suite 16.33 documentation](https://developers.piwik.pro/en/latest/data_collection/web/javascript_tracking_client/api.html#goal-conversions)

---

<div class="post-metadata">

**Author:** ![davidkrogstrup](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/davidkrogstrup/32/1078_2.png) [@davidkrogstrup](https://community.piwik.pro/u/davidkrogstrup)\
**Post date:** [December 22, 2022, 3:05pm UTC](https://community.piwik.pro/t/send-goal-with-dynamic-value-to-piwik-pro-from-gtm/1425/3 "2022-12-22T15:05:51Z")

</div>

Thanks a lot @Admin for your quick answer 🙏

It works just perfect 👌
