# Using mautic in mobile app

**URL:** <https://forum.mautic.org/t/using-mautic-in-mobile-app/2465>\
**Category:** Product Support\
**Created:** [October 4, 2015, 7:37pm UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465 "2015-10-04T19:37:44Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [October 4, 2015, 7:37pm UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/1 "2015-10-04T19:37:44Z")

</div>

We just started using and testing mautic, and so far it’s very complete and robust. We wish to use it for automated marketing within our mobile App. However the cookie tracking system is meant for website marketing. Is there a way to call the tracker with lead ID instead of counting on the cookie to take care of that?  
  
  
  
Or some other way.  
  
  
  
If we can easily use mautic for mobile apps it would open a whole new frontier. The docs are focused on web so far. Look forward to using this amazing tool in our apps!

---

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [October 4, 2015, 7:37pm UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/2 "2015-10-04T19:37:44Z")

</div>

We just started using and testing mautic, and so far it’s very complete and robust. We wish to use it for automated marketing within our mobile App. However the cookie tracking system is meant for website marketing. Is there a way to call the tracker with lead ID instead of counting on the cookie to take care of that?

Or some other way.

If we can easily use mautic for mobile apps it would open a whole new frontier. The docs are focused on web so far. Look forward to using this amazing tool in our apps!

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 5, 2015, 6:25am UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/3 "2015-10-05T06:25:05Z")

</div>

Mautic was build as marketing automation for the web. But I think it is possible to use it in a mobile app as well. You can call the tracking request from the app or connected server with CURL and pass some identifier of the lead. For example email address. If you mark email address in the Lead Fields as unique, Mautic will add the actions to the right lead.

[https://www.mautic.org/docs/leads/lead\_monitoring.html](https://www.mautic.org/docs/leads/lead_monitoring.html)

Also, there is an API where you can do more stuff.

[https://developer.mautic.org/#rest-api](https://developer.mautic.org/#rest-api)  
[https://github.com/mautic/api-library](https://github.com/mautic/api-library)

---

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [October 5, 2015, 7:07pm UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/4 "2015-10-05T19:07:27Z")

</div>

Thanks @escopecz

So for everyone’s benefit (and mautic may include later in docs), here is what we did:

1. We made sure the email field is public, unique and allows lookups (so the tracker can refer to it)
2. We created a lead form that only has the email in it (we could add more fields)
3. We created a campaign that starts with this form, and looks at ‘bogus’ page opens (which are actually screens in our app e.g. `http://yourdomain.com/mtracking.gif?page_url=main_screen&email=my3mail@domain.com`) to trigger actions

Now, we make a POST call to the form directly from the app when we have a new lead, and we load the tracker GIF with the page screens we want (passing email field as well). And we now have a fully operational automated marketing from our app.

We had done the same thing in the past with Google Analytics before they had the mobile version ready.

PS: You may want to document this in the docs page you sent.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 6, 2015, 5:22am UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/5 "2015-10-06T05:22:24Z")

</div>

Awesome. Thanks for describing it.

Feel free to send a PR to the documentation repositories:  
[https://github.com/mautic/developer-documentation](https://github.com/mautic/developer-documentation)  
[https://github.com/mautic/documentation](https://github.com/mautic/documentation)

---

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [October 6, 2015, 11:46am UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/6 "2015-10-06T11:46:44Z")

</div>

Thanks @escopecz ,  
I just completed the pull request

(PS: I noticed a typo after, sorry, not yet familiar with the GITHUB platform – and was worried I would loose my edits as I tried to play with it).

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 7, 2015, 4:39am UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/7 "2015-10-07T04:39:13Z")

</div>

That’s awesome. Looking at it now.

---

<div class="post-metadata">

**Author:** ![aprpac](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@aprpac](https://forum.mautic.org/u/aprpac)\
**Post date:** [October 7, 2015, 4:58pm UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/8 "2015-10-07T16:58:34Z")

</div>

Hi @ramez_rafla & @escopecz ,

Just been reading your posts above with great interest as this is something I am interested in doing. However I am a humble Product Manager rather than a developer and as such do not fully understand some of the finer details, so would you mind answering a couple of questions for me?

1. We have an iPhone app which works with dedicated hardware (over BLE) and I would like users to register their hardware within the app primarily so that we can keep them informed about new firmware upgrades for that hardware etc. I would love to use Mautic for this (as well as its normal excellent functionality). Is this feasible with the solution you have identified?
2. Can we use the API directly from within the app as it requires an auth token which expires?

Thanks in anticipation

---

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [October 21, 2015, 12:19am UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/9 "2015-10-21T00:19:54Z")

</div>

@escopecz

We faced an unexpected issue, which I documented here:  
[https://github.com/mautic/mautic/issues/9#issuecomment-149707302](https://github.com/mautic/mautic/issues/9#issuecomment-149707302)

Mautic uses the IP address in the absence of a cookie (as to expect from within an App) to track a lead, even if we have the email field present in the GIF tracker. This messes things up when we have multiple users with a single IP.

Can you direct me as to where in the code I should look, and I could fix it and issue a pull-request?

Thank you

---

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [October 16, 2015, 4:27pm UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/10 "2015-10-16T16:27:06Z")

</div>

@aprpac, sorry for delay.

From reading your post, it seems you only need to follow the instructions I posted. @escopecz hasn’t approved it yet, so here is the direct link:

[https://github.com/ramezrafla/documentation/blob/134fedf005848c49551f8f03e564240dea729473/leads/lead\_monitoring.md](https://github.com/ramezrafla/documentation/blob/134fedf005848c49551f8f03e564240dea729473/leads/lead_monitoring.md)

@escopecz , can you please approve the changes? People would benefit from this doc

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 19, 2015, 7:29am UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/11 "2015-10-19T07:29:10Z")

</div>

I commented on you PR.

---

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [October 19, 2015, 11:41am UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/12 "2015-10-19T11:41:46Z")

</div>

Changes applied - all yours!

---

<div class="post-metadata">

**Author:** ![vascoas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/vascoas/32/951_2.png) [@vascoas](https://forum.mautic.org/u/vascoas)\
**Post date:** [February 19, 2016, 4:26pm UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/13 "2016-02-19T16:26:53Z")

</div>

I’m experiencing the same problems as the ones described in this thread. However I don’t know if these are related to @ramez_rafla 's last comment or if this pull-request didn’t land up to Mautic v1.2.4 (last version I know of and the one we are using).

@ramez_rafla or @escopecz could you please give us an update about if the PR landed in v1.2.4 and if the reported issue (last comment) is fixed or something that will be fixed?

Thank you both.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:57pm UTC](https://forum.mautic.org/t/using-mautic-in-mobile-app/2465/14 "2020-02-02T22:57:47Z")

</div>


