Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update sophi.data to reflect custom post type #326

Closed
1 task done
YMufleh opened this issue Sep 1, 2022 · 1 comment · Fixed by #327
Closed
1 task done

update sophi.data to reflect custom post type #326

YMufleh opened this issue Sep 1, 2022 · 1 comment · Fixed by #327
Assignees
Milestone

Comments

@YMufleh
Copy link
Collaborator

YMufleh commented Sep 1, 2022

Is your enhancement related to a problem? Please describe.

When users publish a custom post type that is a video.
The FE should have that data reflected in the sophi.data object.
that is,

sophi.data.page.type = 'video' (currenly it is set at 'section'`)
&
sophi.data.content.type = 'video'

sophi.data.content should reflect that content as well.

The tracker will pick up on those values and report them.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@iamdharmesh
Copy link
Contributor

Hi @YMufleh,

Thanks for opening the issue, I just looked at the code and it seems the code is already there to get content type of post. Also, looking at the given example video, it seems these aren't considered single post type pages. Not sure how these are being built on the theme side but it's registering this as the homepage.

In this case, they'll need to utilize the filter (sophi_tracking_data) to modify the data appropriately, I have created PR to add a tutorial doc on how to modify tracking data before sending it to Sophi.

image

Thanks.
cc: @jeffpaul @dkotter

@jeffpaul jeffpaul added this to the 1.3.0 milestone Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants