Repository navigation
[WEBSITE-723] Remove tracking from Personal emails sent by automations - #85
Merged
Merged
Conversation
The live automation test of the Personal template arrived with no footer or unsubscribe link but with the open pixel and its links rewritten through click tracking. Automation emails are queued by FunnelCampaign::subscribe(), which adds click tracking right then from the cached site-wide setting and marks the body parsed, so the fluentcrm_email_body_text filter never runs for them. The template's render hook now swaps each ns_url link back to the URL FluentCRM stored for it (Smart Links stay tracked, since they only work through the redirect) and turns off open tracking on the campaign before FluentCRM adds the pixel. Part of WEBSITE-723.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The live test of the Personal template from an automation arrived with no footer or unsubscribe link, but the open-tracking pixel was still there and the docs link went through
www.gravitykit.com?ns_url=…. Personal emails sent by automations now have no pixel and their links point straight at the real URL, as campaign and one-off Personal emails already did.For review: the restore only touches links whose short code is in
fc_url_storesand whose stored URL is not a Smart Link. Check that a Personal email can't lose a link FluentCRM needs to redirect.Part of WEBSITE-723
What changed
FunnelCampaign::subscribe(), which adds click tracking at queue time from the cached site-widefluentcrmTrackClicking()and marks the body parsed.fluentcrm_email_body_textnever runs for them, so [WEBSITE-723] Add a Personal email template so founder emails don't look like marketing #83's tracking switch never applied.PersonalTemplate::render()now:open_tracker/click_trackertonoin memory.CampaignEmail::getEmailBody()reads$campaign->getOpenTrackingStatus()on that same object after the template renders, to decide the pixel.hrefwithns_url=<short>back to the URL stored for that short code (UrlStores::getRowByShort()). Unknown codes and Smart Links (smart_url) stay tracked.AGENTS.md: the two send paths and where each one's tracking is removed.Blast radius
PersonalTemplate(added in [WEBSITE-723] Add a Personal email template so founder emails don't look like marketing #83; internal). Reads FluentCRM'sUrlStores::getRowByShort(), present in 3.3.1 (production) and 3.3.5.used-by.sh, 0 hits forgk_personal).Release: none (internal gravitykit.com plugin; customers don't install it).
Tests
php84 vendor/bin/phpunit: 250 tests pass; the email tests also on PHP 7.4. Removing the link restore fails its test.FunnelCampaign::processAndSubscribe()) and sent throughMailer::send(), captured in Mailpit. Both queued bodies hadns_urllinks before sending.href="https://www.gravitykit.com/docs/")Abilities: none. Internal site plumbing.