A method comprising: receiving, at a user device and at a particular time, an input indicating interaction associated with a digital component that is (i) provided by a content provider and (ii) presented by a user interface of the user device; determining, by a trusted program of the user device, that the interaction is valid by: detecting, by the trusted program, that the user interface of the user device was active and actively presenting the digital component at the particular time; determining, by the trusted program and in response to detecting that the user interface of the user device was active and actively presenting the digital component at the particular time, a set of attributes of the digital component, including a location within the user interface at which the digital component was actively presented; comparing, by the trusted program, each attribute of the determined set of attributes with a corresponding attribute in a set of reference attributes of the digital component that are provided by the content provider; evaluating validity of the interaction, based on the comparison and by the trusted program, wherein the interaction is deemed valid in response to (i) the comparison indicating a match between the determined set of attributes and the set of reference attributes and (ii) the detection that the user interface of the user device was active and actively presenting the digital component at the particular time; generating, by the trusted program and based on the determination that the interaction is valid based on the validity evaluation, a digitally signed token that attests the validity of the interaction with the digital component; and providing, by the trusted program and to a third party, the digitally signed token as an indication of the validity of the interaction. receiving, at a user device and at a particular time, an input indicating interaction associated with a digital component that is (i) provided by a content provider and (ii) presented by a user interface of the user device; (i) provided by a content provider and (ii) presented by a user interface of the user device; determining, by a trusted program of the user device, that the interaction is valid by: detecting, by the trusted program, that the user interface of the user device was active and actively presenting the digital component at the particular time; determining, by the trusted program and in response to detecting that the user interface of the user device was active and actively presenting the digital component at the particular time, a set of attributes of the digital component, including a location within the user interface at which the digital component was actively presented; comparing, by the trusted program, each attribute of the determined set of attributes with a corresponding attribute in a set of reference attributes of the digital component that are provided by the content provider; evaluating validity of the interaction, based on the comparison and by the trusted program, wherein the interaction is deemed valid in response to (i) the comparison indicating a match between the determined set of attributes and the set of reference attributes and (ii) the detection that the user interface of the user device was active and actively presenting the digital component at the particular time; detecting, by the trusted program, that the user interface of the user device was active and actively presenting the digital component at the particular time; determining, by the trusted program and in response to detecting that the user interface of the user device was active and actively presenting the digital component at the particular time, a set of attributes of the digital component, including a location within the user interface at which the digital component was actively presented; comparing, by the trusted program, each attribute of the determined set of attributes with a corresponding attribute in a set of reference attributes of the digital component that are provided by the content provider; evaluating validity of the interaction, based on the comparison and by the trusted program, wherein the interaction is deemed valid in response to (i) the comparison indicating a match between the determined set of attributes and the set of reference attributes and (ii) the detection that the user interface of the user device was active and actively presenting the digital component at the particular time; (i) the comparison indicating a match between the determined set of attributes and the set of reference attributes and (ii) the detection that the user interface of the user device was active and actively presenting the digital component at the particular time; generating, by the trusted program and based on the determination that the interaction is valid based on the validity evaluation, a digitally signed token that attests the validity of the interaction with the digital component; and providing, by the trusted program and to a third party, the digitally signed token as an indication of the validity of the interaction.