parcelvoy / platform

Parcelvoy: Open source multi-channel marketing automation platform. Send data-driven emails, sms, push notifications and more!
https://parcelvoy.com
Other
188 stars 32 forks source link

How to add Unsubscribe URL in email design? #430

Closed tanmay-predisai closed 3 months ago

tanmay-predisai commented 3 months ago

Apologies - if this is not the right forum to ask this. I checked the entire documentation and could not find this.

I am looking to add an unsubscribe URL to the end of an email template. What is the variable I can use to add it? I assume a variable like "{{ UnsubscribeURL }}" needs to be placed in the email body. Could you please help?

pushchris commented 3 months ago

You can access via {{ unsubscribeEmailUrl }} for a direct unsubscribe link, {{ preferencesUrl }} for a link to a preference page to modify their subscription settings

tanmay-predisai commented 3 months ago

Seems to be working fine! Thank you! Congratulations for making this - we are trying to explore if we can use this with posthog.

tanmay-predisai commented 3 months ago

Another question - when we click on the unsubscribe URL, it is not counted as a click in the delivery details. Is this by design or we can do something to make this click trackable?

pushchris commented 3 months ago

Few questions:

tanmay-predisai commented 3 months ago
  1. Yes Link wrapping is turned on for the project.
  2. The unsubscribe link looks like this - https://domain.com/unsubscribe/email?u=3G5291K94Y&c=6NMKZ3KEQG
  3. Another link that's tracked properly looks like this - https://domain.com/c?u=3G5291K94Y&c=6NMKZ3KEQG&r=https%253A%252F%252Fmjml.io%252F. It finally redirects to https://mjml.io/

Also, On a side note - I am having a hard time getting the file uploads working. My setup is - parcelyvoy docker + nginx server. I tried following the steps from here - https://github.com/parcelvoy/platform/issues/381. However not able to get it working since this references caddy server and we are using nginx. Would you have any additional documentation? Some questions :

  1. The dir-path under the "volumes: - uploads: " in the docker-compose.yml can be any directory on the disk? Are there any configurations wrt docker for this dir-path? Are there any permission configurations?
  2. In Nginx config, should I use location /uploads { root }

or use this - https://github.com/parcelvoy/platform/issues/381#issuecomment-1991611239

Thank you for your help!

tanmay-predisai commented 3 months ago

Also, we tried sending a newsletter to 50k users. It sent around 14K emails and stopped. After checking I realized that we ran out of disk space. I checked the MySQL db size inside docker, and its size crossed 7.3 GB. I had allocated 12GB of disk space for testing. I wanted to understand the expected behaviour here - how much disk space is expected to be used?

Our idea was to start using this for our weekly newsletters + journeys. We tried sending the newsletter first (to 50k first, were going to send to 600K in total) to test and then were going to start experimenting with journeys.

pushchris commented 3 months ago

In the future, please open new issues for new topics otherwise it wont be helpful to other folks that might experience the same thing. This thread is going to get quite messy.

For unsubscribe links, this should be resolved in the next release. It looks like we had a check in place to not wrap internal links which the unsubscribe link is considered.

For images:

Without knowing your setup I can't provide more details unfortunately. In general we would recommend sticking to the provided Docker Compose file.

For database size, that seems a bit high, but I don't know what all you have in there outside of just those emails you are sending. You would have to give me a breakdown of what size each of your tables is. I'm assuming most of that size is probably in the user_events table which is expected to always be the largest since it stores a copy of the message sent to each user so you can preview it. Total amount stored will be proportional to how large your messages are.

tanmay-predisai commented 3 months ago

Thank you for your reply and my apologies for adding everything in one issue. I will take care henceforth.

  1. We will wait for the next release. This is not a blocker.
  2. We will use the S3 route as suggested.
  3. Here is what we did : a. Installed Parcelvoy using the docker images. b. Added a list of 50K users. c. Sent a newsletter to all users. This is the email. We did not use any user properties in the email. The Mysql DB size reached 7.3GB after sending 14K emails. Since the server ran out of disk space, the rest of the email could not be sent. d. Would it be possible to have a configuration where a per-user copy of the message is not stored? I ask this because we typically send 3M+ emails every month and were planning to start journeys that would add more emails. Just having the read/open stats per user should be enough. I am afraid that In the current state, we would be using too much disk space as we use this on a consistent basis.
pushchris commented 3 months ago

@tanmay-predisai just merged a PR that will let you turn off logging the email preview via an env variable (LOG_COMPILED_MESSAGE). I would still be curious to know the sizes of each of your tables though to validate that that is in fact the table causing issues for you. The users table for example could also be problematic depending on what data you are storing for each user.

tanmay-predisai commented 3 months ago

Hello, Thank you for this. We tried doing this and here are the updates:

  1. Made a fresh install on a new server instance. We tried adding the variable in .env file - We added the line LOG_COMPILED_MESSAGE=false at the end of the .env file.
  2. Tried sending 50K emails again. However, the disk size again started increasing. Fortunately, we had made the new server with more disk space so the server did not crash. Here is the screenshot of the table sizes. Screenshot 2024-04-12 at 6 12 52 PM
  3. Seems we made some mistake in configuring the variable value. Can you please point out how to do this?
pushchris commented 3 months ago

@tanmay-predisai can you please provide some examples of what an item in the user_events table looks like? Feel free to scrub any sensitive data, but without knowing what is in there I can't be more helpful

pushchris commented 3 months ago

Closing this for now since there has been no new activity, if you have further issues please comment or open a new issue. Thanks!