# Custom Preference Center - customizing the tokens

**URL:** <https://forum.mautic.org/t/custom-preference-center-customizing-the-tokens/30465>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [January 11, 2024, 10:39pm UTC](https://forum.mautic.org/t/custom-preference-center-customizing-the-tokens/30465 "2024-01-11T22:39:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![entrepositive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/entrepositive/32/9645_2.png) [@entrepositive](https://forum.mautic.org/u/entrepositive)\
**Post date:** [January 11, 2024, 10:39pm UTC](https://forum.mautic.org/t/custom-preference-center-customizing-the-tokens/30465/1 "2024-01-11T22:39:33Z")

</div>

**Your problem**  
My problem is:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/5/5f9d8b7211c6454c8b98e5642b9c3b107c81ff18.png)

I want to remove the default text “My segments” from the token _{segmentlist}_. Anyone know how?

Steps I have tried to fix the problem:  
I tried thinking about the problem, didn’t help much.  
I also tried putting on sweet sunglasses to look awesome. I did look awesome but it didn’t solve this problem.  
So I asked here.

**Your software**  
My Mautic version is: 4.4.5  
My PHP version is: 7.4.33  
My Database type and version is: 10.6.12-MariaDB-0ubuntu0.22.04.1

EP

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [January 12, 2024, 12:53am UTC](https://forum.mautic.org/t/custom-preference-center-customizing-the-tokens/30465/2 "2024-01-12T00:53:19Z")

</div>

Where exactly is that?

---

<div class="post-metadata">

**Author:** ![entrepositive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/entrepositive/32/9645_2.png) [@entrepositive](https://forum.mautic.org/u/entrepositive)\
**Post date:** [January 12, 2024, 4:21am UTC](https://forum.mautic.org/t/custom-preference-center-customizing-the-tokens/30465/3 "2024-01-12T04:21:52Z")

</div>

This is in Landing Page builder, with option \* Set as preference center page\* toggled Yes. Using the token _{segmentlist}_ will auto-populate all segments marked Yes for option \* Available in Preference Center\*, for contacts to opt in/out of each specific list, from the Preference Center.

It’s a great approach and quite intuitive by design. Unfortunately the text “My segments” is baked into the token when it renders and I don’t know how/where to modify that.

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [January 12, 2024, 10:21am UTC](https://forum.mautic.org/t/custom-preference-center-customizing-the-tokens/30465/4 "2024-01-12T10:21:59Z")

</div>

How I would approach this is, I would find the implementation for { segmentlist} token in the core base, then copy it to new token, for example {mycustomsegmentlist} and for this custom token I would remove the “My Segments” from the output.

I do not think you can do this without coding at the moment.

---

<div class="post-metadata">

**Author:** ![entrepositive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/entrepositive/32/9645_2.png) [@entrepositive](https://forum.mautic.org/u/entrepositive)\
**Post date:** [January 12, 2024, 10:07pm UTC](https://forum.mautic.org/t/custom-preference-center-customizing-the-tokens/30465/5 "2024-01-12T22:07:07Z")

</div>

Custom tokens, you say? 🧐 Now that’s an interesting prospect.

While we’re on the subject…can system-wide tokens be created, for example, like the system _{signature}_ token? It would be handy to have custom tokens that can push out universal info.

Here’s an example use case:  
Periodic event announcements sent out to a list. One email needs to be created with a simple campaign to send it on schedule (and the campaign can be updated via API for automation). Now, the email can also be modified at this point. But it could also be handy to have a token, for example, _{eventdetails}_ that injects a bit of HTML, updating the value of _{eventdetails}_ by API or form submit…

Is that a major overhaul or more of a simple fix?

EP

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [January 13, 2024, 10:22am UTC](https://forum.mautic.org/t/custom-preference-center-customizing-the-tokens/30465/6 "2024-01-13T10:22:41Z")

</div>

You can register new tokens in Mautic by subscribing to the right Symfony events, without much hustle.

You need to get the info from somewhere and most of the time you would have to store that info into Mautic database, when you have that all you need to do is tell Mautic how to use the info from the database to produce output for {eventdetails} token.

Adding new tokens to Mautic is simple, its storing and processing the information from external system to get all the required data that needs some extra planning to make this effective.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [January 14, 2024, 10:23pm UTC](https://forum.mautic.org/t/custom-preference-center-customizing-the-tokens/30465/7 "2024-01-14T22:23:38Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
