# Creating custom dimension of logged in users at e-commerce site?

**URL:** <https://community.piwik.pro/t/creating-custom-dimension-of-logged-in-users-at-e-commerce-site/1903>\
**Category:** Data collection and tags\
**Created:** [March 27, 2023, 1:49pm UTC](https://community.piwik.pro/t/creating-custom-dimension-of-logged-in-users-at-e-commerce-site/1903 "2023-03-27T13:49:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlotte99](https://avatars.discourse-cdn.com/v4/letter/c/e9c0ed/32.png) [@charlotte99](https://community.piwik.pro/u/charlotte99)\
**Post date:** [March 27, 2023, 1:49pm UTC](https://community.piwik.pro/t/creating-custom-dimension-of-logged-in-users-at-e-commerce-site/1903/1 "2023-03-27T13:49:12Z")

</div>

Have the following issue: I manage a magento 2 store, and I need to get segmented data on our logged-in e-commerce users based on their custom varible “customer group” - is this possible to set up in Piwik? (in eg targeting variable in datalayer)

---

<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:** [March 27, 2023, 3:22pm UTC](https://community.piwik.pro/t/creating-custom-dimension-of-logged-in-users-at-e-commerce-site/1903/2 "2023-03-27T15:22:36Z")

</div>

Hi. You can read the value from dataLayer and store it as session-level custom dimension. More on it here: [Create a custom dimension | Piwik PRO help center](https://help.piwik.pro/support/reports/custom-dimension/)
