Skip to content

Add TheConversation tracking - #156

Open
jmsevin wants to merge 1 commit into
mainfrom
conversation-pixel
Open

Add TheConversation tracking#156
jmsevin wants to merge 1 commit into
mainfrom
conversation-pixel

Conversation

@jmsevin

@jmsevin jmsevin commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

This pull request adds tracking for "conversation" corpus excerpts in the CardComponent, enabling integration with The Conversation's content tracker. It introduces a new externalId prop, ensures this prop is passed from parent components, and includes tests to verify the tracking logic. The most important changes are:

Conversation excerpt tracking:

  • Added a trackConversationExcerpt method to CardComponent.vue that loads The Conversation's content tracker script when a "conversation" excerpt is opened and an externalId is present. The script is removed after loading or error. (src/components/CardComponent.vue, src/components/CardComponent.vueR29-R54)
  • Updated the excerpt <details> element to trigger the new tracking method on toggle events. (src/components/CardComponent.vue, src/components/CardComponent.vueL103-R127)

Prop and type updates:

  • Added a new optional externalId prop to CardComponent.vue and updated the Document type to include document_external_id. (src/components/CardComponent.vue, [1]; src/types/index.ts, [2]

Prop wiring in parent components:

  • Passed the new externalId prop from parent components (SourcesListComponent.vue, SecondStep.vue) to CardComponent. (src/components/SourcesListComponent.vue, [1] [2]; src/components/tutor/SecondStep.vue, [3]

Testing:

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 this pull request may close these issues.

1 participant