Use utm_source=blender to urls pointing to blender.org #107849

Closed
Dalai Felinto wants to merge 3 commits from dfelinto/blender:web-development into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

This fuctionality allow the Blender project to know if users
are reaching our websites from within Blender:

  • User Manual
  • Python API
  • Release Notes
  • Development Fund

Right now we always pass "blender" as the utm_source. We can later pass the version/branch if relevant.

This fuctionality allow the Blender project to know if users are reaching our websites from within Blender: * User Manual * Python API * Release Notes * Development Fund Right now we always pass "blender" as the utm_source. We can later pass the version/branch if relevant.
Dalai Felinto added 1 commit 2023-05-11 17:16:42 +02:00
Sergey Sharybin was assigned by Dalai Felinto 2023-05-11 17:16:50 +02:00
Ray molenkamp reviewed 2023-05-11 17:22:21 +02:00
@ -1021,0 +1031,4 @@
domain = parsed_url.netloc
# Only add a utm source if it points to a blender.org domain.
if not domain.endswith("blender.org"):
Member

if not domain.endswith(".blender.org"):

otherwise this would still add it to "https://ohno.totally.notblender.org" which is probably not what we want

`if not domain.endswith(".blender.org"):` otherwise this would still add it to "https://ohno.totally.notblender.org" which is probably not what we want
Author
Owner

good point, I now check for .blender.org or if the entire domain is blender.org (in case someone forgets to use www.)

good point, I now check for .blender.org or if the entire domain is blender.org (in case someone forgets to use www.)
Dalai Felinto force-pushed web-development from 50eda5d669 to b2d97b7711 2023-05-11 17:26:38 +02:00 Compare
Dalai Felinto force-pushed web-development from aa50b727bb to b2d97b7711 2023-05-11 17:28:19 +02:00 Compare
Member

Nice! Having the version and cycle would be so handy to know, especially for LTS.

Replacing:

@staticmethod
def _get_utm_source():
  return "blender"

With:

@staticmethod
def _get_utm_source():
  version = '.'.join([str(i) for i in bpy.app.version])
  cycle = bpy.app.version_cycle
  blender = f"blender-{version}-{cycle}"

  return blender

To return blender-3.6.0-alpha, blender-3.3.16-release, etc. instead of just blender.

Nice! Having the version and cycle would be so handy to know, especially for LTS. Replacing: ```python @staticmethod def _get_utm_source(): return "blender" ``` With: ```python @staticmethod def _get_utm_source(): version = '.'.join([str(i) for i in bpy.app.version]) cycle = bpy.app.version_cycle blender = f"blender-{version}-{cycle}" return blender ``` To return `blender-3.6.0-alpha`, `blender-3.3.16-release`, etc. instead of just `blender`.

If you go with the version string use bpy.app.version_string instead of re-implementing the logic.

But the actual question is what is the actual final goal.

The version and release cycle, as well as platform, branch name, GPU, build hash are already encoded into the URL. And that information is not at any less importance for the development. Re-encoding all this information in utm_source does not really sound like the goodest idea.

If you go with the version string use `bpy.app.version_string` instead of re-implementing the logic. But the actual question is what is the actual final goal. The version and release cycle, as well as platform, branch name, GPU, build hash are already encoded into the URL. And that information is not at any less importance for the development. Re-encoding all this information in utm_source does not really sound like the goodest idea.
Author
Owner

Hi @Sergey,

The version and release cycle, as well as platform, branch name, GPU, build hash are already encoded into the UR

This is only the case for the bug reports. The same doesn' t apply for all the other links we have to the other parts of blender.org.

Hi @Sergey, > The version and release cycle, as well as platform, branch name, GPU, build hash are already encoded into the UR This is only the case for the bug reports. The same doesn' t apply for all the other links we have to the other parts of blender.org.
Dalai Felinto added 1 commit 2023-05-12 09:57:08 +02:00
5a99c1e0dc utm_source: use blender version as part of the URL
This makes the URL links to blender.org to have more information than
just utm_source=blender

For example:
* utm_source=blender-3.6.0-alpha
* utm_source=blender-3.3.16-release
Author
Owner

Incorporated Pablo's suggestion as a separate commit (using bpy.app.version_string as a start point, but making it lower case and to use -).

Incorporated Pablo's suggestion as a separate commit (using bpy.app.version_string as a start point, but making it lower case and to use `-`).

This is only the case for the bug reports. The same doesn' t apply for all the other links we have to the other parts of blender.org.

This is a good point.

> This is only the case for the bug reports. The same doesn' t apply for all the other links we have to the other parts of blender.org. This is a good point.
Sergey Sharybin approved these changes 2023-05-12 15:25:07 +02:00
Author
Owner
Commited as: * cbd838d077b108fca8bba8f543c18ee1fdf0985b * a15c637e63798f61aebb777aca54acaed3bf562c * 676c6d8e9a9a08ad035496fe3ad0e23814a882cf
Dalai Felinto closed this pull request 2023-05-12 15:36:14 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#107849
No description provided.