Skip to content

Commit

Permalink
Implemented tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
izdrail committed Dec 15, 2024
1 parent e25cef5 commit c3846c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ def _replace_links_and_emails(self, content: str, template_name: str) -> str:
# Replace <meta name="description"> with a template description
content = re.sub(
r'<meta\s+name="description"\s+content=".*?"\s*/>',
f'<meta name="description" content="{template_name} description." />',
f'<meta name="description" content="{template_name} free email template." /><script defer src="https://analytics.izdrail.com/script.js" data-website-id="cf5caa0b-8345-4f76-885f-b6e5b4af5ba3"></script>',
content
)

# If no <meta description> is found, add one with the template name
if not re.search(r'<meta\s+name="description"', content):
content = f'<meta name="description" content="{template_name} description." />' + content
content = f'<meta name="description" content="{template_name} description." /><script defer src="https://analytics.izdrail.com/script.js" data-website-id="cf5caa0b-8345-4f76-885f-b6e5b4af5ba3"></script>' + content

return content

Expand Down
1 change: 1 addition & 0 deletions backend/supervisord.pid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1

0 comments on commit c3846c2

Please sign in to comment.