# Track Button Click by Signed In User

**URL:** <https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163>\
**Category:** Ask for Help\
**Created:** [February 3, 2021, 7:56am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163 "2021-02-03T07:56:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 3, 2021, 7:56am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/1 "2021-02-03T07:56:45Z")

</div>

Hi!

I have two button components, one on top of each other. I would like to have the firsr button appear if a user has not clicked on it (while the second is hidden) and then the second button to appear once they do, where the first one hidden.

Any idea how I can do this?  
Is there also a way I can tell which users clicked on the first button?

Thanks!

---

<div class="post-metadata">

**Author:** ![Manan\_Mehta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manan_mehta/32/13957_2.png) [@Manan\_Mehta](https://community.glideapps.com/u/Manan_Mehta)\
**Post date:** [February 3, 2021, 8:32am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/2 "2021-02-03T08:32:35Z")

</div>

You could use compound actions and “set columns” for every button click in a new column.  
If you want a log of all the clicks, you could use add row and have another sheet that has a list of rows for every button click as well.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 3, 2021, 9:07am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/3 "2021-02-03T09:07:51Z")

</div>

> [@Jen\_NYCP](#):
>
> Is there also a way I can tell which users clicked on the first button?

Create a column in your User Profiles sheet to record this, and then set a value in that column when the user clicks the button. It can be any type of column, but I usually use a date/time column, and set it to the current time. This tells me:

- the user has clicked it, and
- when they clicked it

---

<div class="post-metadata">

**Author:** ![Mishta\_P](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mishta_p/32/16900_2.png) [@Mishta\_P](https://community.glideapps.com/u/Mishta_P)\
**Post date:** [February 3, 2021, 9:24am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/4 "2021-02-03T09:24:18Z")

</div>

> [@Is there an IF ODD in Glide Sheets](https://community.glideapps.com/t/is-there-an-if-odd-in-glide-sheets/21900/4):
>
> Thanks, Here is what I am thinking and it works for me. Built this concept app just for showing that I am doing. Try it out. Using @Jeff_Hager 's floor method of checking if a number is even or odd: [image] The LIKE Count is how many times the image has been clicked. The FLOOR is a Math column described that returns a number. Then the IF:Odd column checks if there is a match. [image] If it DOES NOT match the Like Counter is ODD, which means the image was clicked an ODD number of times…

Give this a go. You could simple use a counter. Each button press increases the count by 1. If Even button 1 shows, if odd button 2

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 4, 2021, 1:49am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/5 "2021-02-04T01:49:58Z")

</div>

This might explain better what I am trying to achieve.

So here is the front-end setup:  
Everytime a user clicks the ‘redeem’ button on an offer, the number goes down until there no more left. I’m using increments instead of the set columns (not sure if that has a similar effect?) as @Manan_Mehta mentioned. Once they click on the redeem button for a specific offer, the button on the bottom appears and they cannot use this offer anymore. In turn, the top button bar disappears.  
 ![promo123](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/9/89cd75a6046b8eeeffce7a2bde6145b03eb145b7.png)

On the backend I have this setup on the offers sheet. I was wondering if these should be user-specific? Or should this be on the user profiles sheet instead? I think you mentioned this @Darren_Murphy If so, how can this be linked to the offer sheet and specific offer?  
 ![promo1234](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/f/7f5522f92d5465e46dced46f9b7b04361061fe8e.png)

I was also thinking I would have to create some type of relation on this sheet linked to the user profile sheet, or vice versa if it’s supposed to be on the users profile sheet. Maybe I should create a redeemed column on the user profiles sheet and link that as a relation to the offer sheet? Not too sure…

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 4, 2021, 1:58am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/6 "2021-02-04T01:58:48Z")

</div>

Thanks! Yes I’m using increments, my problem is trying is figuring out how to tie a click to specific user.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 4, 2021, 2:16am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/7 "2021-02-04T02:16:33Z")

</div>

Hi Jen,

This is actually quite simple. All you need to do is make the ‘Redeemed’ column in your Offers sheet a User Specific Column.

If the offers are limited to one redemption per user, that can be a boolean column. Otherwise, make it a numeric column.

Then every time a user clicks the ‘Redeem’ button, you do two things:

- Increment the Available column by -1
- Set the Redeemed column to ‘true’ (if limited to one per user), or increment by 1 (if not limited)

Then you use the state of those two columns to drive your component visibility.

And that’s it!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 4, 2021, 2:28am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/8 "2021-02-04T02:28:17Z")

</div>

In addition, if Redeemed is true then show a failure notification, telling the user that they have already redeemed the code (and play some sound).

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 4, 2021, 2:57am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/9 "2021-02-04T02:57:20Z")

</div>

Do you think that’s better than just having the bottom button appear while the top button bar disappears?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 4, 2021, 2:59am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/10 "2021-02-04T02:59:18Z")

</div>

It is a good alternative, yes.

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 4, 2021, 2:59am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/11 "2021-02-04T02:59:37Z")

</div>

Oh, thanks! So I have a multi action setup, I have an -1 increment on the avilable column, but don’t see what I have have for the redeem column? There is no ‘mark true’ or ‘check off’ action.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 4, 2021, 3:27am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/12 "2021-02-04T03:27:25Z")

</div>

Use Set Columns, and then set a custom value of true

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 4, 2021, 4:53am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/14 "2021-02-04T04:53:08Z")

</div>

Thanks! Havent used that action yet, so waasnt sure what it did. So I switched to another user and the ‘redeem’ button does not appear. I have the visibilty set to show when redeemed is false.

Also, is there a way to tell which users redeemed the offer?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 4, 2021, 5:12am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/15 "2021-02-04T05:12:15Z")

</div>

> [@Jen\_NYCP](#):
>
> Also, is there a way to tell which users redeemed the offer?

To do that, you’ll need to:

- add a column to your User Profiles sheet to capture the data
- create a single relation back to your User Profiles sheet
- add another ‘Set Columns’ action to your multi-step flow to set that column, via the single relation

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 4, 2021, 6:11am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/16 "2021-02-04T06:11:10Z")

</div>

Thanks! I will try, the redeem button is not showing up however when I view as a new user.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 4, 2021, 6:13am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/17 "2021-02-04T06:13:49Z")

</div>

Try setting the visibility as “not true” (use all lowercase true)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 4, 2021, 6:52am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/18 "2021-02-04T06:52:02Z")

</div>

Actually, @Jen_NYCP - just thinking about that you shouldn’t need that relation, as you should be able directly set the column

ie. Set Columns → User → column name

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 4, 2021, 8:07am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/19 "2021-02-04T08:07:48Z")

</div>

‘not true’ doesn’t seem work either

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 4, 2021, 8:17am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/20 "2021-02-04T08:17:16Z")

</div>

hmm, it should. When you switch to another user, what do you see in that user specific column?

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [February 4, 2021, 8:20am UTC](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163/21 "2021-02-04T08:20:02Z")

</div>

the box is unchecked

[Next page](https://community.glideapps.com/t/track-button-click-by-signed-in-user/22163.md?page=2)
